Author: Chuck74 | Posted on: 7/11/2008 1:30:48 PM | Views : 559

I want to have this code in my app_code folder to be able to call it from all of the pages in my application.  For example, "me" in the code below passes the page (System.Web.UI.Page).  It works fine when I call it from another page.  The problem is when I want to call an alert from the shared class itself.  I can't pass "me" because it's not a page, but I do know what page I want to specify.  What is the syntax to specify a page?
' call from the default page

ShowMessage(Me, "This is a message!")

' this is the shared class
Public Shared Sub ShowMessage(ByRef aspxPage As System.Web.UI.Page, ByVal strMessage As String)
Dim strScript As String = "<script language=JavaScript>alert('" & strMessage & "')</script>"
If (Not aspxPage.IsStartupScriptRegistered("strKey1&qu ...

Go to the complete details ...