if we use msgbox("alow")
in localhost we can show that, but if we have publish our web asp.net, will not working,
so i use javascript in asp.net
this is example my code :
Protected Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'Button1.Attributes.Add("onclick", "alert('Halo kal')")
Dim strMessage As String
strMessage = "Hi, You clicked ClickMe button"
'finishes server processing, returns to client.
Dim strScript As String = ""
strScript += "alert(""" & strMessage & """);"
strScript += ""
If (Not ClientScript.IsStartupScriptRegistered("clientScript")) Then
ClientScript.RegisterClientScriptBlock(Me.GetType(), "clientScript", strScript)
End If
End Sub
Tidak ada komentar:
Posting Komentar