禁用查看上一页 [英] Disable of viewing previous page

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

问题描述

在运行时,如果我们单击提交...",则登录表单将重定向到Asp.net中的下一页..

然后,如果我们按工具栏中的后退"按钮,它将返回上一页...

如何检查页面的身份验证以禁用上一页....

While run time if we click submit... login form will redirect to next page in Asp.net ..

then if we press back button in the toolbar it will go back to previous page...

How to check authentication for the page to disable previous page ....

推荐答案

我以为你说了再见?我不希望您离开,但令您惊讶的是,您仍在继续,仍然在问最基本的问题,拒绝购买任何书籍或自己做任何研究.

您可以使用Response.Cache.SetCacheability(HttpCacheability.NoCache)关闭所有页面的缓存.然后,最好的方法是:如果有人登录,则将其存储在会话中;如果用户未登录,则创建一个基础页面,该页面将重定向到登录页面.然后,导出您内部的所有页面.此基础页的安全区域.

如果您不理解我刚才所说的话,则表明您不具备基本的技能,可以在这里提出问题,并对回答做一些有用的事情.这也是另一个迹象,这完全表明有人为您编写的代码付费.

==========
您还可以执行以下操作:
Response.Cache.SetExpires(DateTime.UtcNow.AddHours(-1));
Response.Cache.SetNoStore();

-Sandeep
I thought you said goodbye ? I don''t want you to leave, but I''m surprised that you''re still going, and still asking the most basic questions, and refusing to buy any books, or do any research of your own.

You can turn off caching for all your pages, with Response.Cache.SetCacheability(HttpCacheability.NoCache). Then, the best way to do it, is to store in the session if someone is logged in, and create a base page, which redirects to the login page, if the user is not logged in. Then, derive all your pages inside the secure area from this base page.

If you don''t understand what I just said, it''s another sign that you don''t have the basic skills you need to be able to ask questions here, and do something useful with the responses. It''s also another sign that it''s an utter disgrace that someone is paying for the code you are writing.

==========
You can also do something like:
Response.Cache.SetExpires(DateTime.UtcNow.AddHours(-1));
Response.Cache.SetNoStore();

-Sandeep


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

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