Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
after entering user name and password it lead me to main page. but i want If I enter back arrow it don't allow me to go forward without entering password. so how can i do this.?
Posted 15-Nov-12 5:47am
Edited 15-Nov-12 6:56am
v2

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Turn off caching in your pages, so the browser does not show a cached version.
 
Here[^]
 
<%@ OutputCache Duration="0" VaryByParam="None"%>
 
should do it.
 
This[^] is also useful. In theory, the plain HTML way to do it is:
 
<meta http-equiv="Pragma" content="no-cache">
 
although when I googled I found someone who recommended all of this:
 
<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />
  Permalink  
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Maciej Los 245
1 OriginalGriff 210
2 Manfred R. Bihy 190
3 CHill60 180
4 _Amy 155
0 OriginalGriff 7,445
1 Sergey Alexandrovich Kryukov 6,157
2 Maciej Los 3,774
3 Peter Leow 3,448
4 CHill60 2,702


Advertise | Privacy | Mobile
Web04 | 2.8.140721.1 | Last Updated 15 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100