updatepanel用法之triggers使用示例
asyncpostbacktrigger(異步回調(diào)觸發(fā)器):局部刷新,只刷新updatepanel內(nèi)部的內(nèi)容
postbacktrigger(普通回調(diào)觸發(fā)器):全部刷新
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager> //必須有且一定在updatepanel前面
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<% =DateTime.Now.ToString()%>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="btn" />
<asp:AsyncPostBackTrigger ControlID="btn2" EventName="click" />
</Triggers>
</asp:UpdatePanel>
<asp:Button runat="server" Text="刷新1" id="btn"/>
<asp:Button runat="server" Text="刷新2" id="btn2" />
<% =DateTime.Now.ToString()%>
相關(guān)文章
解決 The Controls collection cannot be modified because the co
在.aspx或.ascx的如果包括%,并在.aspx, .ascs中使用了AjaxToolkit中的控件,那么很可能會引發(fā)這個問題,下面給出具體的解決方法。2010-10-10ASP.NET?Core在WebApi項目中使用Cookie
這篇文章介紹了ASP.NET?Core在WebApi項目中使用Cookie的方法,文中通過示例代碼介紹的非常詳細(xì)。對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下2022-03-03.NET 中英文混合驗(yàn)證碼實(shí)現(xiàn)代碼
.NET 中英文混合驗(yàn)證碼實(shí)現(xiàn)代碼2009-11-11ASP.NET打開新頁面而不關(guān)閉原來的頁面 實(shí)例代碼
這篇文章介紹了ASP.NET打開新頁面而不關(guān)閉原來的頁面 實(shí)例代碼,有需要的朋友可以參考一下,希望對你有所幫助2013-07-07