欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Ajax異步無(wú)刷新對(duì)局部數(shù)據(jù)更新

 更新時(shí)間:2013年03月01日 10:21:15   作者:  
Ajax異步無(wú)刷新對(duì)局部數(shù)據(jù)更新的實(shí)例

復(fù)制代碼 代碼如下:

<asp:ScriptManager ID="smScriptManager" runat="server">
</asp:ScriptManager>

復(fù)制代碼 代碼如下:

<asp:UpdatePanel ID="upLinkmanList" UpdateMode="Conditional" runat="server">
<ContentTemplate>
//要更新的數(shù)據(jù)部分,如一個(gè)Repeater,包括分頁(yè)控件;
</ContentTemplate>
</asp:UpdatePanel>

復(fù)制代碼 代碼如下:

//后臺(tái)需要把頁(yè)面注冊(cè)為Ajax
AjaxPro.Utility.RegisterTypeForAjax(typeof(所要注冊(cè)的頁(yè)面Inherits的最后一個(gè)單詞,如:頁(yè)面為:CustomerList.aspx,則這里就是CustomerList));

//注冊(cè)異步控件,lnkbtnRefreshLinkman十個(gè)Linkbutton,用于調(diào)用后臺(tái)的數(shù)據(jù)更新方法;
this.smScriptManager.RegisterAsyncPostBackControl(lnkbtnRefreshLinkman);

//注冊(cè)分頁(yè)控件 this.smScriptManager.RegisterAsyncPostBackControl(this.Pager);


復(fù)制代碼 代碼如下:

/// <summary>
/// 刷新聯(lián)系人列表
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
public void RefreshLinkmanList(object sender, EventArgs e)
{
       //更新Ajax控件所包含在內(nèi)的數(shù)據(jù),Ajax控件的UpdateMode必須指定為Conditional  
       upLinkmanList.Update();
}

復(fù)制代碼 代碼如下:

//前臺(tái)腳本方法里調(diào)用Linkbutton的onclick事件,記得先導(dǎo)入Jquery腳本文件的引用哦
$("#<%=lnkbtnRefreshLinkman.ClientID %>").click();

相關(guān)文章

最新評(píng)論