Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 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
 
Old October 3rd, 2007, 01:34 AM
Authorized User
 
Join Date: Feb 2005
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default Page Expires on Browser Back


Hi,
   I have a problem with browser back button in my website on production server. I have done lot of googling but cannot find the solution. However browser back button work correctly on local server.

I am using asp.net 1.1 / C#, Window 2003 server and also me website using ssl.

In some pages browser back button works correctly, but in some page it gives the following error.

The page you requested was created using information you submitted in a form. This page is no longer available. As a security precaution, Internet Explorer does not automatically resubmit your information for you.

To resubmit your information and view this Web page, click the Refresh button.

Any Help would be highly appreciated.

With Regards,
Umair Hasan Zubairy,
Software Engineer.
__________________
Umair Hasan Zubairy
Software Engineer
Auriga group of Companies
 
Old October 3rd, 2007, 04:03 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

You have described what happens but not what the problem is. When you post data to a page then return to that page via the back button the data is not automatically posted again. If it were then you would find yourself accidentally sending extra orders every time you went back to a 'confirm order' page on a shopping site for example. If you want the data to be re-submitted then use the querystring to pass it, using GET requests to modify data though is usually considered poor architectural practice.

--

Joe (Microsoft MVP - XML)
 
Old October 3rd, 2007, 04:25 AM
Authorized User
 
Join Date: Feb 2005
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default


First of all thanks for you reply, At some extent you understand the problem correctly. In this case i want the browser button to function as it does normally i.e. fetch the page from cache.

I want to mention one more thing only those pages got expired that involves database transaction. On other page ( that does not involve database transaction) browser back button works fine.

Thanks...

Umair Hasan Zubairy
Software Developer
Auriga group of computer
 
Old October 3rd, 2007, 04:42 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

Without the warning? Then that's not possible if you have posted data the first time.

--

Joe (Microsoft MVP - XML)
 
Old October 3rd, 2007, 07:31 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

I good solution for this kind of problem is to use a secondary page after your information is posted. I.E. after your postback event is processed, redirect the user to another page that is just informational. This page won't have a post associated with it so you can easily go "back" to it without adverse affects. Additionally, when you go another step back from that page you'll skip over the posted view of the page and end up back on the view where you entered the data. Of course, if you do the event that triggered the postback you'll repeat the process.

-Peter
 
Old October 4th, 2007, 02:04 AM
Authorized User
 
Join Date: Feb 2005
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Actually my whole website is on https, do u think it would work.

Umair Hasan Zubairy
Software Developer
Auriga group of computer
 
Old October 4th, 2007, 11:48 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

https has no impact on the suggestion I made. It will work the same.

-Peter





Similar Threads
Thread Thread Starter Forum Replies Last Post
Session/Cookie Expires, Login page appears rajn ASP.NET 1.0 and 1.1 Professional 3 June 27th, 2007 06:19 AM
Page expires on hitting backspace! nishant_611 Pro JSP 0 May 9th, 2007 01:26 AM
Page Expires on hitting backspace. nishant_611 JSP Basics 0 May 9th, 2007 01:22 AM
Page Expires on hitting backspace. nishant_611 Apache Tomcat 0 May 9th, 2007 01:19 AM
page expires isheikh BOOK: Beginning ASP 3.0 1 May 31st, 2004 11:06 PM





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