W
walterd
Hi All
Can someone please help me before I pull out all my hair? All my pages
inherit from PageBase class and I have the following code:
Public Shared Function CreateMessageAlert(ByRef aspxPage As
System.Web.UI.Page, ByVal strMessage As String, ByVal strKey As String)
Dim strScript As String = "<script language=JavaScript>alert('" & strMessage
& "')</script>"
If (Not aspxPage.IsStartupScriptRegistered(strKey)) Then
aspxPage.RegisterStartupScript(strKey, strScript)
End If
End Function
My problems is:
1. When I call the following function from an, say exception or
notification, the MessageBox appears on a BLANK Page, after clicking OK, the
page where the MessageBox was invoked from is displayed. It never displays
on the current page
{
2. If I want to display a message and upon clicking OK, redirect the page to
another, the MessageBox never appears. Page redirect will happen and no
message will appear
(
PLEASE HELP!!!!
Can someone please help me before I pull out all my hair? All my pages
inherit from PageBase class and I have the following code:
Public Shared Function CreateMessageAlert(ByRef aspxPage As
System.Web.UI.Page, ByVal strMessage As String, ByVal strKey As String)
Dim strScript As String = "<script language=JavaScript>alert('" & strMessage
& "')</script>"
If (Not aspxPage.IsStartupScriptRegistered(strKey)) Then
aspxPage.RegisterStartupScript(strKey, strScript)
End If
End Function
My problems is:
1. When I call the following function from an, say exception or
notification, the MessageBox appears on a BLANK Page, after clicking OK, the
page where the MessageBox was invoked from is displayed. It never displays
on the current page
2. If I want to display a message and upon clicking OK, redirect the page to
another, the MessageBox never appears. Page redirect will happen and no
message will appear
PLEASE HELP!!!!