Click here to Skip to main content
15,900,258 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: opening GridView in contentplaceholder of masterpage Pin
Sandeep Mewara25-May-10 1:20
mveSandeep Mewara25-May-10 1:20 
GeneralRe: opening GridView in contentplaceholder of masterpage Pin
mominafiz25-May-10 1:50
mominafiz25-May-10 1:50 
GeneralRe: opening GridView in contentplaceholder of masterpage Pin
Sandeep Mewara25-May-10 19:16
mveSandeep Mewara25-May-10 19:16 
Questionproblem in clearing the sessions Pin
Amit Spadez24-May-10 23:48
professionalAmit Spadez24-May-10 23:48 
AnswerRe: problem in clearing the sessions Pin
P. S. Pundeer25-May-10 0:58
P. S. Pundeer25-May-10 0:58 
GeneralRe: problem in clearing the sessions Pin
Amit Spadez25-May-10 1:45
professionalAmit Spadez25-May-10 1:45 
AnswerRe: problem in clearing the sessions Pin
T M Gray25-May-10 8:28
T M Gray25-May-10 8:28 
AnswerRe: problem in clearing the sessions Pin
Sandeep Mewara25-May-10 19:22
mveSandeep Mewara25-May-10 19:22 
You can disable the Browser back button such that the scenario does not occur:


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 something 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

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>");   
}

AnswerRe: problem in clearing the sessions Pin
Ryan McBeth26-May-10 5:35
Ryan McBeth26-May-10 5:35 
GeneralRe: problem in clearing the sessions Pin
Amit Spadez26-May-10 18:51
professionalAmit Spadez26-May-10 18:51 
GeneralRe: problem in clearing the sessions Pin
Ryan McBeth27-May-10 1:16
Ryan McBeth27-May-10 1:16 
GeneralRe: problem in clearing the sessions Pin
Amit Spadez27-May-10 2:10
professionalAmit Spadez27-May-10 2:10 
GeneralRe: problem in clearing the sessions Pin
Ryan McBeth27-May-10 3:27
Ryan McBeth27-May-10 3:27 
GeneralRe: problem in clearing the sessions Pin
Ryan McBeth27-May-10 3:41
Ryan McBeth27-May-10 3:41 
GeneralRe: problem in clearing the sessions Pin
Amit Spadez27-May-10 18:24
professionalAmit Spadez27-May-10 18:24 
GeneralRe: problem in clearing the sessions Pin
Amit Spadez27-May-10 18:41
professionalAmit Spadez27-May-10 18:41 
GeneralRe: problem in clearing the sessions Pin
Ryan McBeth28-May-10 3:35
Ryan McBeth28-May-10 3:35 
GeneralRe: problem in clearing the sessions Pin
Amit Spadez28-May-10 3:52
professionalAmit Spadez28-May-10 3:52 
QuestionMessage Removed Pin
24-May-10 22:32
Dot-Net-Dev24-May-10 22:32 
AnswerRe: User Login through http post Pin
saini arun24-May-10 23:32
saini arun24-May-10 23:32 
GeneralRe: User Login through http post Pin
R. Giskard Reventlov24-May-10 23:52
R. Giskard Reventlov24-May-10 23:52 
QuestionMAC address code issue [modified] Pin
Abdul-Rhman Alsri24-May-10 21:41
Abdul-Rhman Alsri24-May-10 21:41 
AnswerRe: MAC address code issue Pin
Peace ON24-May-10 21:53
Peace ON24-May-10 21:53 
GeneralRe: MAC address code issue Pin
Abdul-Rhman Alsri25-May-10 4:36
Abdul-Rhman Alsri25-May-10 4:36 
QuestionIIS as web server Pin
NetQuestions24-May-10 21:35
NetQuestions24-May-10 21:35 

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.