Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: Disabling back button


Message #1 by Jean Halstad <J_Halstad@S...> on Wed, 20 Mar 2002 14:59:40 -0000
Once a user has entered data into a form, I want to prevent him/her from
returning to that form if it has not been refreshed.
 
On the form page tried:
Response.CacheControl = "no-cache"
Response.AddHeader "Pragma", "no-cache"
Response.AddHeader "Expires", "0"
 
But get this error:
Object doesn't support this property or method: 'Response.CacheControl' 
 
Also tried
<meta http-equiv="Expires" content="Mon, 06 Jan 1990 00:00:01 GMT">
which does nothing

		    *******SEAFOOD WEEK*******
			4 to 11 October 2002
		to register your interest contact us on
		       seafoodweek@s...

***************************************************************************
This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed
If you have received this e-mail in error please notify
seafish@s...

If the content is not about the business of the Sea Fish Industry Authority
or the sea fish industry then the message is neither from nor sanctioned
by the Sea Fish Industry Authority.
Message #2 by Mark Eckeard <meckeard2000@y...> on Wed, 20 Mar 2002 09:26:59 -0800 (PST)
Try this:

'Code to force the page to refresh.	
Response.ExpiresAbsolute = #1/1/2001# 'Always expire
the page.
Response.AddHeader "cache-control", "no-store,
must-revalidate, private" 
Response.AddHeader "Pragma", "no-cache"

Mark.

--- Jean Halstad <J_Halstad@S...> wrote:
> Once a user has entered data into a form, I want to
> prevent him/her from
> returning to that form if it has not been refreshed.
>  
> On the form page tried:
> Response.CacheControl = "no-cache"
> Response.AddHeader "Pragma", "no-cache"
> Response.AddHeader "Expires", "0"
>  
> But get this error:
> Object doesn't support this property or method:
> 'Response.CacheControl' 
>  
> Also tried
> <meta http-equiv="Expires" content="Mon, 06 Jan 1990
> 00:00:01 GMT">
> which does nothing
> 
> 		    *******SEAFOOD WEEK*******
> 			4 to 11 October 2002
> 		to register your interest contact us on
> 		       seafoodweek@s...
> 
>
***************************************************************************
> This e-mail and any files transmitted with it are
> confidential and intended
> solely for the use of the individual or entity to
> whom they are addressed
> If you have received this e-mail in error please
> notify
> seafish@s...
> 
> If the content is not about the business of the Sea
> Fish Industry Authority
> or the sea fish industry then the message is neither
> from nor sanctioned
> by the Sea Fish Industry Authority.
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/
Message #3 by "Bharat Saboo" <bharatsaboo@h...> on Wed, 20 Mar 2002 23:06:51 +0530
i tried using the addheader cache-control option, but it does not seem to 
work

try out this instead

Response.CacheControl = "NO-CACHE"

The above works on my website.
This is running on IIS 4.0

hope this helps

bharat

>From: Mark Eckeard <meckeard2000@y...>
>Reply-To: "ASP Web HowTo" <asp_web_howto@p...>
>To: "ASP Web HowTo" <asp_web_howto@p...>
>Subject: [asp_web_howto] Re: Disabling back button
>Date: Wed, 20 Mar 2002 09:26:59 -0800 (PST)
>
>Try this:
>
>'Code to force the page to refresh.
>Response.ExpiresAbsolute = #1/1/2001# 'Always expire
>the page.
>Response.AddHeader "cache-control", "no-store,
>must-revalidate, private"
>Response.AddHeader "Pragma", "no-cache"
>
>Mark.
>
>--- Jean Halstad <J_Halstad@S...> wrote:
> > Once a user has entered data into a form, I want to
> > prevent him/her from
> > returning to that form if it has not been refreshed.
> >
> > On the form page tried:
> > Response.CacheControl = "no-cache"
> > Response.AddHeader "Pragma", "no-cache"
> > Response.AddHeader "Expires", "0"
> >
> > But get this error:
> > Object doesn't support this property or method:
> > 'Response.CacheControl'
> >
> > Also tried
> > <meta http-equiv="Expires" content="Mon, 06 Jan 1990
> > 00:00:01 GMT">
> > which does nothing
> >
> > 		    *******SEAFOOD WEEK*******
> > 			4 to 11 October 2002
> > 		to register your interest contact us on
> > 		       seafoodweek@s...
> >
> >
>***************************************************************************
> > This e-mail and any files transmitted with it are
> > confidential and intended
> > solely for the use of the individual or entity to
> > whom they are addressed
> > If you have received this e-mail in error please
> > notify
> > seafish@s...
> >
> > If the content is not about the business of the Sea
> > Fish Industry Authority
> > or the sea fish industry then the message is neither
> > from nor sanctioned
> > by the Sea Fish Industry Authority.
> >
>
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! Sports - live college hoops coverage
>http://sports.yahoo.com/
>


_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx

Message #4 by Jean Halstad <J_Halstad@S...> on Thu, 21 Mar 2002 16:30:34 -0000
Great, thanks, that did the trick.

-----Original Message-----
From: Mark Eckeard [mailto:meckeard2000@y...]
Sent: 20 March 2002 17:27
To: ASP Web HowTo
Subject: [asp_web_howto] Re: Disabling back button


Try this:

'Code to force the page to refresh.	
Response.ExpiresAbsolute = #1/1/2001# 'Always expire
the page.
Response.AddHeader "cache-control", "no-store,
must-revalidate, private" 
Response.AddHeader "Pragma", "no-cache"

Mark.

--- Jean Halstad <J_Halstad@S...> wrote:
> Once a user has entered data into a form, I want to
> prevent him/her from
> returning to that form if it has not been refreshed.
>  
> On the form page tried:
> Response.CacheControl = "no-cache"
> Response.AddHeader "Pragma", "no-cache"
> Response.AddHeader "Expires", "0"
>  
> But get this error:
> Object doesn't support this property or method:
> 'Response.CacheControl' 
>  
> Also tried
> <meta http-equiv="Expires" content="Mon, 06 Jan 1990
> 00:00:01 GMT">
> which does nothing
> 
> 		    *******SEAFOOD WEEK*******
> 			4 to 11 October 2002
> 		to register your interest contact us on
> 		       seafoodweek@s...
> 
>
***************************************************************************
> This e-mail and any files transmitted with it are
> confidential and intended
> solely for the use of the individual or entity to
> whom they are addressed
> If you have received this e-mail in error please
> notify
> seafish@s...
> 
> If the content is not about the business of the Sea
> Fish Industry Authority
> or the sea fish industry then the message is neither
> from nor sanctioned
> by the Sea Fish Industry Authority.
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/


		    *******SEAFOOD WEEK*******
			4 to 11 October 2002
		to register your interest contact us on
		       seafoodweek@s...

***************************************************************************
This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed
If you have received this e-mail in error please notify
seafish@s...

If the content is not about the business of the Sea Fish Industry Authority
or the sea fish industry then the message is neither from nor sanctioned
by the Sea Fish Industry Authority.

  Return to Index