日期:2014-05-18  浏览次数:20777 次

请高手指点,初学ajax,ie提示出错:'Sys.WebForms.PageRequestManagerServerErrorException:...404
<%@   Page   Language= "C# "   AutoEventWireup= "true "   CodeFile= "Default.aspx.cs "   Inherits= "_Default "   %>
<!DOCTYPE   html   PUBLIC   "-//W3C//DTD   XHTML   1.1//EN "   "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd ">
<html   xmlns= "http://www.w3.org/1999/xhtml ">
<head   runat= "server ">
        <title> Untitled   Page </title>
</head>
<body     topmargin   = "0 ">
        <form   id= "form1 "   runat= "server "   >
            <asp:ScriptManager   ID= "ScriptManager1 "   runat= "server "   />
                <asp:UpdatePanel   ID= "UpdatePanel1 "   runat= "server "   UpdateMode= "Conditional ">
                        <ContentTemplate>
                                &nbsp; <asp:Label   ID= "Label1 "   runat= "server "   Text= "Label "> </asp:Label>
                                <%=   DateTime.Now.ToString()   %>
                        </ContentTemplate>
                </asp:UpdatePanel>
                <br   />
                <asp:Button   ID= "Button1 "   runat= "server "     Text= "Button "   OnClick= "Button1_Click1 "   /> &nbsp;&nbsp;
        </form>
</body>
</html>


using   System;
using   System.Data;
using   System.Configuration;
using   System.Web;
using   System.Web.Security;
using   System.Web.UI;
using   System.Web.UI.WebControls;
using   System.Web.UI.WebControls.WebParts;
using   System.Web.UI.HtmlControls;

public   partial   class   _Default   :   System.Web.UI.Page  
{
        protected   void   Page_Load(object   sender,   EventArgs   e)
        {
                ScriptManager1.RegisterAsyncPostBackControl(Button1);
        }
        protected   void   Button1_Click1(object   sender,   EventArgs   e)
        {
                Label1.Text   =   "first   ajax   program! ";
                UpdatePanel1.Update();
        }
}


这个是书上的例子,可是怎么老是出错,google了一下,还是看不出哪里错了,请高手指点一下。

------解决方案--------------------