Click here to Skip to main content
15,912,665 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi


I use window.alert() in my function previously work, but now it cannot work properly.


What I have tried:

showmessage("hi")

Protected Sub ShowMessage(ByVal stringMessageContent As String) If (stringMessageContent.Trim().Length > 0) Then

        stringMessageContent = stringMessageContent.Replace("\r\n", " ")
        stringMessageContent = stringMessageContent.Replace("'", "")
        ClientScript.RegisterStartupScript(Me.GetType(), "ClientScript", "<script language='JavaScript'>  window.alert('" + stringMessageContent + "');</script>")

    End If


End Sub



But the message not show in any browser. pls give me a solution ASAP
Posted
Comments
ChauhanAjay 27-Dec-18 0:32am    
Check the below link, hope this helps
https://stackoverflow.com/questions/5825165/javascript-alert-showmessage-from-asp-net-code-behind/5827956
ZurdoDev 27-Dec-18 21:01pm    
You need to debug your code. Simple.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900