Gridview不停留在当前页面

编程入门 行业动态 更新时间:2024-10-26 04:30:06
本文介绍了Gridview不停留在当前页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我创建了与sqldatasource绑定的Gridview. AllowPageing = True 在gridview中,我创建了Edit(超链接)和Delete(按钮). 通过单击编辑链接",它将重定向到具有该行数据的另一个页面,以便我们可以通过单击更新"按钮将其更新到网格页面",然后再次重新加载Gridview. 我不希望它保持在我单击编辑"的位置. 我的gridview在updatepannel内部 Asp,C#

I created Gridview which is bind with sqldatasource. AllowPageing =True In gridview I created Edit(Hyperlink) and Delete(Button). By clicking Edit Link It redirect to another page having that Row data, so that we can update on that data, by clicking Update button It redirect to Grid Page and reload Gridview again. I don''t want that it should stay at the position from where I click Edit. My gridview is inside the updatepannel Asp, C#

推荐答案

按照您的描述,您正在导航到新页面(进行编辑),然后返回到原始页面.您了解ASP.NET不知道此操作与第一次访问网格页之间的区别吗? 要保持该位置,您将需要一个复杂的过程来保持该位置,然后在返回时强制页面滚动到该位置.替代方法可以是使用就地编辑,也可以使用模式对话框来显示编辑页面. As you describe it you are navigating to a new page (to do the editing) then back to the original page. You understand that ASP.NET does not know the difference between this and visiting the grid page for the first time? To maintain the position you would need a complicated process to persist the position then force the page to scroll to that position on return. Alternatives could be using in-place editing or use a modal dialog to display the edit page.

更多推荐

Gridview不停留在当前页面

本文发布于:2023-10-08 02:00:03,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1471189.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:页面   Gridview

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!