Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 24th, 2006, 06:46 AM
Registered User
 
Join Date: Dec 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to prevent Back History after Sing Out my site

I have a problem , I trying to prevent Back history after I singed out my site , how to handle this problem


  #2 (permalink)  
Old December 27th, 2006, 04:12 PM
Skb Skb is offline
Authorized User
 
Join Date: Oct 2006
Location: , , .
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Put this code in page which should not access using back button.

protected override void OnPreRender(EventArgs e)
{
        base.OnPreRender(e);
    string sb ;
    sb = "<script language=javascript>\n";
    sb += "window.history.forward(1);\n";
    sb += "\n</script>";
    Page.RegisterClientScriptBlock("clientScript",sb);
}

  #3 (permalink)  
Old December 28th, 2006, 02:55 AM
Authorized User
 
Join Date: May 2006
Location: , , .
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Default

ad this script on ur page to prevent user moving back tot he previous visted page:

<script language="javascript">
 window.history.forward();
</script>

and restrict caching of the pages that only member can access:

Response.Expires = -1
Response.AddHeader "pragma", "no-cache"
Response.CacheContr ol = "no-cache"

write this code in page_load

Regards,
Rashida Jabeen
http://www.akaas.net
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Prevent users from using back button?? Phrozt C# 3 January 8th, 2007 11:02 AM
history.back(-1); elania Javascript How-To 3 February 2nd, 2005 03:14 PM
history.back or hitting the back button won't work lian_a Classic ASP Basics 4 July 29th, 2004 12:14 AM
How to prevent submit back bveerendrakumar Classic ASP Basics 3 November 11th, 2003 01:21 AM



All times are GMT -4. The time now is 05:08 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.