When Loading a page I would like to have a messagebox come up rather than having the user click a button. Currently It will work once the page loads and the user clicks the button... But I want it to prompt the user as soon as it loads.. Is this not possible?
Thank you!!
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If (Not Page.IsPostBack) Then
btnEaglemark.Attributes.Add("onclick", "return confirm('Would you like to Print Eaglemark?');")
End If
End Sub
Protected Sub btnEaglemark_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnEaglemark.Click
'lets change the Lettering for the Application
lblCompany.Text = "Eaglemark Savings Bank"
End Sub
Public Class Utilities
Public Shared Sub CreateConfirmBox(ByRef btn As WebControls.Button, _
ByVal strMessage As String)
btn.Attributes.Add("onclick", "return confirm('" & strMessage & "');")
End Sub
End Class
Thank you!!
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If (Not Page.IsPostBack) Then
btnEaglemark.Attributes.Add("onclick", "return confirm('Would you like to Print Eaglemark?');")
End If
End Sub
Protected Sub btnEaglemark_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnEaglemark.Click
'lets change the Lettering for the Application
lblCompany.Text = "Eaglemark Savings Bank"
End Sub
Public Class Utilities
Public Shared Sub CreateConfirmBox(ByRef btn As WebControls.Button, _
ByVal strMessage As String)
btn.Attributes.Add("onclick", "return confirm('" & strMessage & "');")
End Sub
End Class