亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

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

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

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

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

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

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

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

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

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

//注冊分頁控件 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ù)制代碼 代碼如下:

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

相關(guān)文章

最新評論