Dear all,
How do I apply ScriptManager.RegisterStartupScript in global module or global class?. I want show javaScript Alert
It always raises an error like this:
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC30451: Name 'ScriptManager' is not declared.
Public Sub ShowMsgBox(ByVal Msg As String)
Dim Pg As Page = HttpContext.Current.Handler
If Not Pg Is Nothing Then
Msg = Msg.Replace("'", "\'")
ScriptManager.RegisterClientScriptBlock(Pg, Pg.GetType(), "msg", "alert('" & Msg & "')", True)
End If
End Sub
It's confusing me, I run it well from MS. Visual Studio 2005 But after I copied it into our server, Windows 20003 it rose an error like that.
I have already installed AJAX.Net Framework in our server.
Thanks for the advance