Dear venkat,
I hope this will help you out:
Public Sub UserMsgBox(ByVal sMsg As String, ByVal objPage As System.Web.UI.Page)
Dim sb As New StringBuilder
Dim oFormObject As System.Web.UI.Control
sMsg = sMsg.Replace("'", "\'")
sMsg = sMsg.Replace(Chr(34), "\" & Chr(34))
sMsg = sMsg.Replace(vbCrLf, "\n")
sMsg = "<script language=javascript>alert(""" & sMsg & """)</script>"
sb = New StringBuilder
sb.Append(sMsg)
For Each oFormObject In objPage.Controls
If TypeOf oFormObject Is HtmlForm Then
Exit For
End If
Next
' Add the javascript after the form object so that the
' message doesn't appear on a blank screen.
oFormObject.Controls.AddAt(oFormObject.Controls.Co unt, New LiteralControl(sb.ToString()))
End Sub
hello friends,
can any body give me an example for getting message box in asp.net.i dont know how to get it.plz give me an example .or plz tell me how to use alert in asp.net
regards
venkat3475