Hi
I found this snipped of code for creating a message box from clicking a button
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim message As String = "Order Placed Successfully."
Dim sb As New System.Text.StringBuilder()
sb.Append("<script type = 'text/javascript'>")
sb.Append("window.onload=function(){")
sb.Append("alert('")
sb.Append(message)
sb.Append("')};")
sb.Append("</script>")
ClientScript.RegisterClientScriptBlock(Me.GetType(), "alert", sb.ToString())
End Sub
I thought this would create a message box for me. It does if I use int in the page load event. What I want to do is Validate some data and provide the user on the client-side with a message box informing them that there are missing fields.
I have tried ...
Go to the complete details ...