翻页问题 [英] page back problem

查看:74
本文介绍了翻页问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两页:
login.aspx和customer.aspx
当我登录时,aspx登录到customer.aspx.
在customer.aspx上是显示客户数据的网格视图.
在gridview中单击编辑"按钮时,它将进入编辑模式.
但是当我在浏览器中按返回按钮时,它返回到login.aspx.

我希望它以非编辑(正常)模式保留在customer.aspx中.

我的网站上其他页面也有相同的问题

thanx.

i have two pages:
login.aspx and customer.aspx
when i login on login,aspx it goes to customer.aspx.
on customer.aspx is a gridview showing customer data.
on click of edit button in gridview it goes to edit mode.
but when i press the back button in browser it go back to login.aspx.

i want it to remain in customer.aspx in non edit(normal) mode.

i have the same problem with other pages on my site

thanx.

推荐答案

您可以在登录页面中检查会话/cookie,如果用户已经登录,则可以重定向到所需页面.
You can check the session/cookies in the login page and redirect to the desired page if user already logged in.


您是否在customer.aspx中使用了AJAX?你没有提到.
如果是,那么您可以仅基于查看/编辑/等模式显示/隐藏面板.
我认为您可以在Gridview&中显示记录您可以在Grid中具有用于添加/编辑/删除/查看的按钮,以在另一个面板中显示详细信息,其中还包含用于导航到记录"列表的按钮.您只需要AJAX.

您可以通过以下javascript禁用后退按钮.
Did you used AJAX in your customer.aspx? You didn''t mentioned that.
If yes, then you can just show/hide panels based on View/Edit/etc modes.
I think you can show the Records in Gridview & you can have buttons in Grid for Add/Edit/Delete/View for showing the details in another panel which contains also button for navigating to Record list. All you need is AJAX.

You can disable back button by below javascript.
<script type="text/javascript">history.forward();</script>



如有任何疑问,请告诉我.



Please let me know if you have any doubt.


这篇关于翻页问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆