积极答复者
用UpdatePanel做简单的测试出现网页有错,在调试时出现sys未定义,怎么解决?

问题
-
body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<%= DateTime.Now.ToString() %>
<asp:Button ID="Button1" runat="server" Text="Button" />
</ContentTemplate>
</asp:UpdatePanel>
<hr />
<asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional" >
<ContentTemplate>
<%= DateTime.Now.ToString()%>
<asp:Button ID="Button2" runat="server" Text="Button" />
</ContentTemplate>
</asp:UpdatePanel>
</form>
</body>- 已移动 孟宪会Moderator 2009年3月28日 10:07
答案
-
按两个按钮都刷新是因为你在UpdatePanel上没有指定Button为异步回发。
1) sys未定义的问题看看你的javascript是否正确加载到客户端
2) 是否在服务器端正确安装了ASP.NET AJAX Extension 1.0
3) 把你的<%= DateTime.Now.ToString() %>这种服务器端标签换成Label试试,记得以前好像听闻这种标签对ASP.NET AJAX脚本有影响。- 已标记为答案 KeFang Chen 2009年4月3日 9:27
全部回复
-
请参考http://www.cnblogs.com/qfsoft/archive/2009/03/10/1407717.html
宠辱不惊,看庭前花开花落。去留无意,望天上云卷云舒。 -
按两个按钮都刷新是因为你在UpdatePanel上没有指定Button为异步回发。
1) sys未定义的问题看看你的javascript是否正确加载到客户端
2) 是否在服务器端正确安装了ASP.NET AJAX Extension 1.0
3) 把你的<%= DateTime.Now.ToString() %>这种服务器端标签换成Label试试,记得以前好像听闻这种标签对ASP.NET AJAX脚本有影响。- 已标记为答案 KeFang Chen 2009年4月3日 9:27
-
http://www.syqiche.cn/WebResource.axd?d=ghwZEZd2fS31We0rVR2udA2&t=633840475539531250 提示找不到文件
I like I DO 微软技术的忠实拥护者网络优化、网站推广www.bestsem.net,欢迎光临~~