如何在asp.net c#页面刷新时保持gridview的页面索引# [英] how to maintain page index of gridview on page refresh in asp.net c#
本文介绍了如何在asp.net c#页面刷新时保持gridview的页面索引#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨先生,
告诉我在asp.net c#中页面刷新时维护gridview的页面索引的步骤。我每20秒刷新一次页面。
如果我在gridview中查看第10页,在页面刷新后我需要保持相同的第10页。请给我这个问题的
解决方案。
[注意:我正在刷新我的页面每隔20秒从数据库获取更新的记录到gridview]
解决方案
将最后一页索引保持在视图状态并在空检查后在页面索引中分配视图状态值
Hi sir,
Tell me the steps to maintain page index of gridview on page refresh in asp.net c#. I am refreshing my page for every 20 seconds.
If i am viewing the 10 th page in gridview, after the page refresh i need to maintain the same 10 th page. Kindly give me the
solution for this problem.
[Note: I am refreshing my page for every 20 seconds to get the updated records from the database to gridview]
解决方案
Keep last pageindex in view state & assign view state value in page index after null check
这篇关于如何在asp.net c#页面刷新时保持gridview的页面索引#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文