Rad Grid 未与 response.redirect 绑定
我有一个包含 rad 网格的页面 grid.aspx,当选择一行进行更新时,用户将被重定向到另一个页面,他可以在其中更新该行,提交更新后我想将用户重定向回 grid.aspx ,但是网格显示没有记录可显示? 当我导航到另一个页面然后返回 grid.aspx 时,它工作正常。
仅供参考:更新页面不使用数据源,检索项目并手动填写表单。我使用了response.redirect(“grid.aspx”)。
提前致谢
I have a page grid.aspx which contains a rad grid, when a row is selected for update the user is redirected to another page where the he can update the row, after submitting the updates I want to redirect the user back to grid.aspx, but the grid displays that there are no records to display?
When I navigate to another page and then go back to grid.aspx it works fine.
FYI: the update page doesn't use a data source, the item is retrieved and the form is filled manually. I used response.redirect("grid.aspx").
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的 grid.aspx 页面是缓存的受害者吗?为了消除这种情况,请向查询字符串添加一个随机参数:
也许您没有在页面生命周期的正确部分绑定网格或获取数据。如果您获取数据并始终将其绑定在 Page_Load 中(不管 IsPostback),这是否可以解决问题?如果确实如此,则从该开始,然后逐步更改绑定的时间/方式,直到您对结果感到满意为止。
当然,它也可能只是您代码中的一个错误,没有人可以在不查看您的代码的情况下解决该错误。
Is your grid.aspx page the victim of caching? To eliminate this, add a random parameter to the query string:
Maybe you have not bound your grid or fetched your data during the correct part of the page lifecycle. If you fetch your data and always bind it (irrespective of IsPostback) in the Page_Load, does that fix the issue? If it does then start with that, and then step by step change when/how you bind until you are satisfied with the result.
Of course it could also just be a bug in your code, which no-one can solve without seeing your code.