Page Expired

see07

Regular
Joined
Apr 16, 2004
Messages
78
Location
Mexico City
Hello:
How Can I avoid a user go to a page place before current page being displayed on screen? I want to send automate message of IE where reads “Warning: Page Expired….”
I’ll thank all your suggestions.
A.L.
 
Finally I got the answer.

private void Page_Load(object sender, System.EventArgs e)
{
System.DateTime dt = new DateTime(1961, 1, 5, 1, 1, 1, 1);
Response.Cache.SetExpires(dt);
Response.Cache.SetCacheability(HttpCacheability.NoCache);
}

This code is working very well, I share it everybody, enjoy of this….
 
see07 said:
Finally I got the answer.

private void Page_Load(object sender, System.EventArgs e)
{
System.DateTime dt = new DateTime(1961, 1, 5, 1, 1, 1, 1);
Response.Cache.SetExpires(dt);
Response.Cache.SetCacheability(HttpCacheability.NoCache);
}

This code is working very well, I share it everybody, enjoy of this….
I believe those same settings can be applied in your Page declaration of the html, this would prevent you from needing to put it in your OnLoad event. Not sure though.
 
Yeah ... it can be putted in the Meta tag.

I used the same thing and it work perfectly... I only used DateTime.Now instead of... 5th january 1961 ? :p lollllll
 
Arch4ngel said:
Yeah ... it can be putted in the Meta tag.

I used the same thing and it work perfectly... I only used DateTime.Now instead of... 5th january 1961 ? :p lollllll

Myself . . .
I havent got around to doing this, but I need to apply this to all pages and I was thinking of putting it in the global section. anyone got code for doing that???

thanks in advance
 
Back
Top