避免回传到数据列表动态分页 [英] avoiding post back on datalist dynamic paging
本文介绍了避免回传到数据列表动态分页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,我正在处理数据列表.我有一个问题,我不想在单击按钮时回发我的页面,请告诉我如何避免在单击按钮时回传数据列表.
在此先感谢朋友
hello friends i am working on datalist .I have a problem, that i don''t want to post back my page on button click , can you please tell me how to avoid post back on button click with datalist.
thanks in advance friends
推荐答案
<asp:UpdatePanel>
<ContentTemplate>
<asp:ListView>.....</asp:ListView>
</ContentTemplate>
</asp:UpdatePanel>
它将回发,但仅部分回发.
否则,如果您不希望按钮执行任何服务器端代码,只需在按钮标签中添加客户端脚本,如
it will postback but only partial postback.
otherwise if you don''t want your button to execute any server side code just add client script in your button tag like
<asp:button id="test" runat="server" onclientclick="alert('boom'); return false;" />
这篇关于避免回传到数据列表动态分页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文