asp.net ajax学习系列功能强大的UpdatePanel控件2
点击次数:16 次 发布日期:2008-11-26 11:01:58 作者:源代码网
|
源代码网推荐 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 源代码网推荐 <script runat="server"> 源代码网推荐 源代码网推荐 protected void Button4_Click(object sender, EventArgs e) 源代码网推荐 { 源代码网推荐 UpdatePanel1.Update(); 源代码网推荐 } 源代码网推荐 </script> 源代码网推荐 <html xmlns="http://www.w3.org/1999/xhtml" > 源代码网推荐 <head runat="server"> 源代码网推荐 <title>Untitled Page</title> 源代码网推荐 <style type="text/CSS"> 源代码网推荐 .UpdatePanelTitle 源代码网推荐 { 源代码网推荐 color:red; 源代码网推荐 } 源代码网推荐 </style> 源代码网推荐 </head> 源代码网推荐 <body> 源代码网推荐 <form id="form1" runat="server"> 源代码网推荐 <div> 源代码网推荐 <asp:ScriptManager ID="ScriptManager1" runat="server"> 源代码网推荐 </asp:ScriptManager> 源代码网推荐 源代码网推荐 <fieldset> 源代码网推荐 <legend class="UpdatePanelTitle">UpdatePanel控件外</legend> 源代码网推荐 <asp:Button runat="server" ID="Button5" Text="引发常规回传" /><br /> 源代码网推荐 <asp:Button runat="server" ID="Button1" Text="引发异步回传" /><br /> 源代码网推荐 Refrest at <%=DateTime.Now.ToUniversalTime()%> 源代码网推荐 </fieldset> 源代码网推荐 源代码网推荐 <asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Conditional" runat="server"> 源代码网推荐 <Triggers> 源代码网推荐 <asp:PostBackTrigger ControlID="Button2" /> 源代码网推荐 </Triggers> 源代码网推荐 <ContentTemplate> 源代码网推荐 <fieldset> 源代码网推荐 <legend class="UpdatePanelTitle">UpdatePanel1</legend> 源代码网推荐 <asp:Button runat="server" ID="Button2" Text="引发常规回传" /> 源代码网推荐 Refresh at <%=DateTime.Now.ToUniversalTime()%> 源代码网推荐 </fieldset> 源代码网推荐 </ContentTemplate> 源代码网推荐 </asp:UpdatePanel> 源代码网推荐 源代码网推荐 源代码网推荐 <asp:UpdatePanel ID="UpdatePanel2" UpdateMode="Conditional" runat="server"> 源代码网推荐 <Triggers> 源代码网推荐 <asp:AsyncPostBackTrigger ControlID="Button1" /> 源代码网推荐 </Triggers> 源代码网推荐 <ContentTemplate> 源代码网推荐 <fieldset> 源代码网推荐 <legend class="UpdatePanelTitle">UpdatePanel2</legend> 源代码网推荐 <asp:Button runat="server" ID="Button3" Text="InPanel2" /> 源代码网推荐 Refresh at <%=DateTime.Now.ToUniversalTime() %><br /> 源代码网推荐 源代码网推荐 <asp:UpdatePanel ID="UpdatePanel3" runat="server" UpdateMode="Always"> 源代码网推荐 <ContentTemplate> 源代码网推荐 <fieldset> 源代码网推荐 <legend class="UpdatePanelTitle">UpdatePanel3:I"m Child of UpdatePanel2</legend> 源代码网推荐 <asp:Button runat="server" ID="Button4" Text="InPanel3" OnClick="Button4_Click" /> 源代码网推荐 Refresh at <%=DateTime.Now.ToUniversalTime()%> 源代码网推荐 </fieldset> 源代码网推荐 </ContentTemplate> 源代码网推荐 </asp:UpdatePanel> 源代码网推荐 </fieldset> 源代码网推荐 源代码网推荐 </ContentTemplate> 源代码网推荐 </asp:UpdatePanel> 源代码网推荐 源代码网推荐 <asp:UpdatePanel ID="UpdatePanel4" UpdateMode="Conditional" runat="server" ChildrenAsTriggers="false"> 源代码网推荐 <ContentTemplate> 源代码网推荐 <fieldset> 源代码网推荐 <legend class="UpdatePanelTitle">UpdatePanel4</legend> 源代码网推荐 <asp:Button runat="server" ID="Button6" Text="引发常规回传,但不更新自己" /> 源代码网推荐 Refresh at <%=DateTime.Now.ToUniversalTime()%> 源代码网推荐 </fieldset> 源代码网推荐 </ContentTemplate> 源代码网推荐 </asp:UpdatePanel> 源代码网推荐 源代码网推荐 </div> 源代码网推荐 </form> 源代码网推荐 </body> 源代码网推荐 </html> 源代码网推荐 http://www.cnblogs.com/sharpaxe/archive/2006/10/25/539867.html 源代码网推荐 做人要厚道,请注明转自酷网动力(www.ASPCOOL.COM)。 源代码网推荐 源代码网供稿. |
