Ajax异步无刷新对局部数据更新
2018-10-12 13:53
489 查看
<asp:ScriptManager ID="smScriptManager" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="upLinkmanList" UpdateMode="Conditional" runat="server">
<ContentTemplate>
//要更新的数据部分,如一个Repeater,包括分页控件;
</ContentTemplate>
</asp:UpdatePanel>
//后台需要把页面注册为Ajax
AjaxPro.Utility.RegisterTypeForAjax(typeof(所要注册的页面Inherits的最后一个单词,如:页面为:CustomerList.aspx,则这里就是CustomerList));//注册异步控件,lnkbtnRefreshLinkman十个Linkbutton,用于调用后台的数据更新方法;
this.smScriptManager.RegisterAsyncPostBackControl(lnkbtnRefreshLinkman);//注册分页控件 this.smScriptManager.RegisterAsyncPostBackControl(this.Pager);
/// <summary>
/// 刷新联系人列表
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
public void RefreshLinkmanList(object sender, EventArgs e)
{
//更新Ajax控件所包含在内的数据,Ajax控件的UpdateMode必须指定为Conditional
upLinkmanList.Update();
}
//前台脚本方法里调用Linkbutton的onclick事件,记得先导入Jquery脚本文件的引用哦
$("#<%=lnkbtnRefreshLinkman.ClientID %>").click();
您可能感兴趣的文章:
相关文章推荐
- Ajax异步无刷新更新局部数据
- Ajax异步无刷新对局部数据更新
- 1.MVC框架复习 2.Ajax加强 3.搜索建议 4,三级联动 5、刷新分页 6、Ajax局部动态更新数据
- 关于ajax局部刷新,从数据库实时更新数据到页面(一般是下订单成功后发送消息到后台)
- 传统方式实现AJAX异步获取数据,局部刷新
- ajax异步问题导致的刷新页面数据不更新
- 页面无刷新更新数据(ajax异步加载)
- ajax异步刷新实现更新数据库
- 1.MVC框架复习 2.Ajax加强 3.搜索建议 4,三级联动 5、刷新分页 6、Ajax局部动态更新数据
- flask+sqlite3+echarts3+ajax 异步更新数据
- AJAX无刷新更新数据
- Ajax无刷新实现定时更新数据
- MVC3 用Ajax删除数据和无刷新更新数据
- ajax页面无刷新 IE下遭遇Ajax缓存导致数据不更新的问题
- ajax、jquery、jquery模板实现异步表单,局部刷新
- javascript发送表单文件,ajax异步,不刷新页面上传PDF文件,并写入数据库,得到异步数据,提示上传成功或失败
- ajax.BeginForm异步提交表单并显示更新数据
- 省、市、地区三级级联菜单(读数据库那种,Ajax异步调用,局部刷新)
- 利用ajax实现与php(json数组)数据交互,并局部刷新页面