Server Error in '/' Application.
--------------------------------------------------------------------------------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: CS0234: The type or namespace name 'ScriptManager' does not exist in the namespace 'System.Web.UI' (are you missing an assembly reference?)Source Error: Line 35:             //page.ClientScript.RegisterStartupScript(page.GetType(), "message", "<script language='javascript' defer>alert('" + msg.ToString() + "');</script>");
Line 36:             string strMessage = "alert('" + msg + "')";
Line 37:             System.Web.UI.ScriptManager.RegisterStartupScript(control, control.GetType(), null, strMessage, true);
Line 38:         }
Line 39: 
 Source File: c:\Inetpub\wwwroot\App_Code\Tool\MessageBox.cs    Line: 37
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42 

解决方案 »

  1.   

    Compiler Error Message: CS0234: The type or namespace name 'ScriptManager' does not exist in the namespace 'System.Web.UI' (are you missing an assembly reference?) 
      

  2.   

    page.ClientScript.RegisterStartupScript(page才是正解
      

  3.   

    不太理解3楼的,那一段代码如下:
    public static void AjaxShow(Control control, string msg)
            {
                //page.ClientScript.RegisterStartupScript(page.GetType(), "message", "<script language='javascript' defer>alert('" + msg.ToString() + "');</script>");
                string strMessage = "alert('" + msg + "')";
                System.Web.UI.page.ClientScript.RegisterStartupScript(control, control.GetType(), null, strMessage, true);
            }
    怎么改啊,不太清楚,请讲具体点,谢谢!!