Click here to Skip to main content
15,868,016 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Page can't be displayed! Pin
Hiren solanki9-Dec-10 2:49
Hiren solanki9-Dec-10 2:49 
GeneralRe: Page can't be displayed! Pin
Jassim Rahma9-Dec-10 2:55
Jassim Rahma9-Dec-10 2:55 
AnswerRe: Page can't be displayed! Pin
Hiren solanki9-Dec-10 3:09
Hiren solanki9-Dec-10 3:09 
AnswerRe: Page can't be displayed! Pin
Vimalsoft(Pty) Ltd9-Dec-10 3:30
professionalVimalsoft(Pty) Ltd9-Dec-10 3:30 
GeneralRe: Page can't be displayed! Pin
Jassim Rahma9-Dec-10 3:39
Jassim Rahma9-Dec-10 3:39 
GeneralRe: Page can't be displayed! Pin
Vimalsoft(Pty) Ltd9-Dec-10 3:49
professionalVimalsoft(Pty) Ltd9-Dec-10 3:49 
AnswerRe: Page can't be displayed! Pin
Abhijit Jana9-Dec-10 5:04
professionalAbhijit Jana9-Dec-10 5:04 
AnswerRe: Page can't be displayed! Pin
Sandeep Mewara9-Dec-10 5:43
mveSandeep Mewara9-Dec-10 5:43 
Well, browers back button does not reloads the whole page and so I have to disagree with other replies about clearing the session. It happens, because of browser cache and you need to clear that out after logout.

Try:
code for clearing cache can be put up in code behind as follows:
C#
// Code disables caching by browser. Hence the back browser button
// grayed out and could not causes the Page_Load event to fire 
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetExpires(DateTime.UtcNow.AddHours(-1));
Response.Cache.SetNoStore();


You can add somethin similar in form aspx if you want to place it there:
<META Http-Equiv="Cache-Control" Content="no-cache">
<META Http-Equiv="Pragma" Content="no-cache">
<META Http-Equiv="Expires" Content="0">


OR

You can clear browser history through JavaScript....

JavaScript
//clears browser history and redirects url
<SCRIPT LANGUAGE=javascript> {  var Backlen=history.length;   history.go(-Backlen);   window.location.href=page url }</SCRIPT>


OR
C#
Page.ClientScript.RegisterStartupScript(this.GetType(),"cle","windows.history.clear",true);


OR as you say in you logout event:
C#
protected void LogOut()   
{       
     Session.Abandon();       
     string nextpage = "Logoutt.aspx";       
     Response.Write("<script language=javascript>");             
     Response.Write("{");       
     Response.Write(" var Backlen=history.length;");       
     Response.Write(" history.go(-Backlen);");       
     Response.Write(" window.location.href='" + nextpage + "'; ");
     Response.Write("}");       
     Response.Write("</script>");   
}


Had you searched this very site 'Question & Answer' section, you would had found this answer.
GeneralRe: Page can't be displayed! Pin
Abhijit Jana9-Dec-10 5:52
professionalAbhijit Jana9-Dec-10 5:52 
GeneralRe: Page can't be displayed! Pin
Sandeep Mewara9-Dec-10 5:55
mveSandeep Mewara9-Dec-10 5:55 
GeneralRe: Page can't be displayed! Pin
Abhijit Jana9-Dec-10 5:58
professionalAbhijit Jana9-Dec-10 5:58 
GeneralRe: Page can't be displayed! Pin
Sandeep Mewara9-Dec-10 6:03
mveSandeep Mewara9-Dec-10 6:03 
GeneralRe: Page can't be displayed! Pin
Abhijit Jana9-Dec-10 6:10
professionalAbhijit Jana9-Dec-10 6:10 
GeneralRe: Page can't be displayed! Pin
Sandeep Mewara9-Dec-10 6:27
mveSandeep Mewara9-Dec-10 6:27 
GeneralRe: Page can't be displayed! Pin
Abhijit Jana9-Dec-10 8:49
professionalAbhijit Jana9-Dec-10 8:49 
QuestionWorking with tabcontrol in windows application Pin
sarang_k8-Dec-10 16:46
sarang_k8-Dec-10 16:46 
AnswerRe: Working with tabcontrol in windows application Pin
Brij8-Dec-10 19:29
mentorBrij8-Dec-10 19:29 
Questionpass variable between ASP.NET pages Pin
Jassim Rahma8-Dec-10 4:02
Jassim Rahma8-Dec-10 4:02 
AnswerRe: pass variable between ASP.NET pages Pin
NeverHeardOfMe8-Dec-10 4:08
NeverHeardOfMe8-Dec-10 4:08 
AnswerRe: pass variable between ASP.NET pages Pin
David Mujica8-Dec-10 4:14
David Mujica8-Dec-10 4:14 
GeneralRe: pass variable between ASP.NET pages Pin
NeverHeardOfMe8-Dec-10 4:18
NeverHeardOfMe8-Dec-10 4:18 
AnswerRe: pass variable between ASP.NET pages Pin
Hiren solanki9-Dec-10 2:47
Hiren solanki9-Dec-10 2:47 
Questiondetermine the back page Pin
Jassim Rahma8-Dec-10 3:41
Jassim Rahma8-Dec-10 3:41 
AnswerRe: determine the back page Pin
fjdiewornncalwe8-Dec-10 3:54
professionalfjdiewornncalwe8-Dec-10 3:54 
GeneralRe: determine the back page Pin
Not Active8-Dec-10 5:18
mentorNot Active8-Dec-10 5:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.