i have this function :
Public Sub javaMsg(ByVal message As String)
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>")
Page.ClientScript.RegisterClientScriptBlock(Me.GetType(), "alert", sb.ToString())
End Sub
i need to put it in a vb class so i can be able to use it in all my pages but i'm getting an error on "Page.ClientScript" saying that "Reference to a non-shred member requires an object reference"
How can i solve this please :)
Thank you !