D
Dave
I have an app with several web forms. Code for each of the forms contains a
subroutine I wrote that performs the Javascript function "alert". Thus:
Private Sub DisplayAlert(ByVal msg As String)
Dim sKey As String = "s"
Dim alertScript As String = "<script language=JavaScript runat=server> "
alertScript &= "alert('" & msg & "');"
alertScript &= "</script>"
RegisterClientScriptBlock(sKey, alertScript)
End Sub
The subroutine works fine as long as I have a version in each of the web
form modules, but I would like to put a single instance of this subroutine
into a module I have for public routines. When I try that, the compiler
objects to the "RegisterClientScriptBlock" statement. ("Name
'RegisterClientScriptBlock' is not declared.")
Would someone please help me with this?
Thanks in advance,
Dave
subroutine I wrote that performs the Javascript function "alert". Thus:
Private Sub DisplayAlert(ByVal msg As String)
Dim sKey As String = "s"
Dim alertScript As String = "<script language=JavaScript runat=server> "
alertScript &= "alert('" & msg & "');"
alertScript &= "</script>"
RegisterClientScriptBlock(sKey, alertScript)
End Sub
The subroutine works fine as long as I have a version in each of the web
form modules, but I would like to put a single instance of this subroutine
into a module I have for public routines. When I try that, the compiler
objects to the "RegisterClientScriptBlock" statement. ("Name
'RegisterClientScriptBlock' is not declared.")
Would someone please help me with this?
Thanks in advance,
Dave