This article is used to show message window in vb.net using ajax. The problem comes when you use vb.net using ajax enables website.. This concept is easy to use in C# but it is not easy in vb.net. I am writing two line code for this message window.Private Sub DisplayClientError(ByVal errorDesc As String)Dim script As String = "alert('" + errorDesc + "');"ScriptManager.RegisterStartupScript(Me, GetType(Page), "UserSecurity", script, True)End Sub 'DisplayClientError write this code on click event where you want show message windowProtected Sub ClickButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ClickButton.ClickIf TextBox1.Text = "" ThenDisplayClientError("Enter some text in text box")End IfEnd SubScreen Shot
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: