3
Answers

Show Messagebox in VB.Net web application

Ask a question
I want to show message box on button click event in VB.Net web application , my code is -  

Public Sub MessageBox(ByVal msg As String)
    Dim lbl As New Label
    lbl.Text = "<script language='javascript'>" & Environment.NewLine & _
    "window.alert('" + msg + "')</script>"
    Page.Controls.Add(lbl)
    'End Sub

<asp:Button ID="btnGenerateReport" CssClass="Button100x25" runat="server" Text="View Report" />

Protected Sub btnGenerateReport_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnGenerateReport.Click

MessageBox("test message")

getreportdata()  // this is a function through which i am getting data in my crystel report

End Sub

i want before uploading data my message box should display. But through this code i am not able to.
Please help me.



Answers (3)