I'm developing an application that is a benefits enrolment website.
The benefits can be of any type in any order as stored in a SQL
server. On each page is a Back and Next button. At a certain point
in the initialization of the app, I determine a navigational
structure; what benefit is first, second, etc., therefore, which page
to display first, second and so on.
In session memory I store an array of page URL's and a single value
called "ThisPage". So if "ThisPage" = 3, I look at URLs(3) and it'll
say something like "LTD.aspx". This is the Next button code:
URLs = Session("URLs")
Session("ThisPage") += 1
Response.Redirect(URLs(Session("ThisPage")))
This works better than I expected. I could have ALMOST used a single
page for everything. Anyways, this works flawlessly until someone
hits the Browser back button. We go back but since I didn't click MY
back button, the above values never get updated and the navigation is
thrown out of sync. I could 'browser back' 4 times from page 6 to
page 2 and my session tracking still thinks we're on page 6. If we
hit next it goes to Page 7, not 3.
How does one deal with this? Is there some way of knowing the user
hit the browser's back button so I could execute MY back button's code
and keep the navigation in sync?
Or are there better methods for dynamic navigation?
(I'd rather not disable the browser history and the browser back
button functionality, it seems sloppy to me)
Thanks! :) 5 2309
store the current page idx in a hidden field or viewstate as its only
required on a postback (next or previous).
-- bruce (sqlwork.com)
"Tom wilson" <ye*******@nospam.com> wrote in message
news:0k********************************@4ax.com... I'm developing an application that is a benefits enrolment website. The benefits can be of any type in any order as stored in a SQL server. On each page is a Back and Next button. At a certain point in the initialization of the app, I determine a navigational structure; what benefit is first, second, etc., therefore, which page to display first, second and so on.
In session memory I store an array of page URL's and a single value called "ThisPage". So if "ThisPage" = 3, I look at URLs(3) and it'll say something like "LTD.aspx". This is the Next button code:
URLs = Session("URLs") Session("ThisPage") += 1 Response.Redirect(URLs(Session("ThisPage")))
This works better than I expected. I could have ALMOST used a single page for everything. Anyways, this works flawlessly until someone hits the Browser back button. We go back but since I didn't click MY back button, the above values never get updated and the navigation is thrown out of sync. I could 'browser back' 4 times from page 6 to page 2 and my session tracking still thinks we're on page 6. If we hit next it goes to Page 7, not 3.
How does one deal with this? Is there some way of knowing the user hit the browser's back button so I could execute MY back button's code and keep the navigation in sync?
Or are there better methods for dynamic navigation?
(I'd rather not disable the browser history and the browser back button functionality, it seems sloppy to me)
Thanks! :)
Tom,
This is only a thought, and will generate some additional overhead, but
....
during the initialisation can you put a reverse lookup table into a
session variable.
Then onload query the reverse lookup to retrieve the pages order in the
navigation structure and
Reset Session("ThisPage") to the correct value.
Then when you your user hits back or whatever the navigation will be
kept in sync.
Solution to the Back button problem for IE 5.5 and above.
1) Get rid of the cache
Response.CacheControl = "no-cache";
Response.AddHeader("Pragma", "no-cache");
2) set SmartNavigation = true
Daniel Roth
MCSD.NET
Tom wilson wrote: I'm developing an application that is a benefits enrolment website. The benefits can be of any type in any order as stored in a SQL server. On each page is a Back and Next button. At a certain point in the initialization of the app, I determine a navigational structure; what benefit is first, second, etc., therefore, which page to display first, second and so on.
In session memory I store an array of page URL's and a single value called "ThisPage". So if "ThisPage" = 3, I look at URLs(3) and it'll say something like "LTD.aspx". This is the Next button code:
URLs = Session("URLs") Session("ThisPage") += 1 Response.Redirect(URLs(Session("ThisPage")))
This works better than I expected. I could have ALMOST used a single page for everything. Anyways, this works flawlessly until someone hits the Browser back button. We go back but since I didn't click MY back button, the above values never get updated and the navigation is thrown out of sync. I could 'browser back' 4 times from page 6 to page 2 and my session tracking still thinks we're on page 6. If we hit next it goes to Page 7, not 3.
How does one deal with this? Is there some way of knowing the user hit the browser's back button so I could execute MY back button's
code and keep the navigation in sync?
Or are there better methods for dynamic navigation?
(I'd rather not disable the browser history and the browser back button functionality, it seems sloppy to me)
Thanks! :)
That made absolutely no difference. I can use the browser's back
button just as much with or without it.
Do I have to put this at the top of every page in the project?
On 28 Apr 2005 19:04:47 -0700, da********@gmail.com wrote: Solution to the Back button problem for IE 5.5 and above.
1) Get rid of the cache
Response.CacheControl = "no-cache"; Response.AddHeader("Pragma", "no-cache");
2) set SmartNavigation = true
Daniel Roth MCSD.NET
Tom wilson wrote: I'm developing an application that is a benefits enrolment website. The benefits can be of any type in any order as stored in a SQL server. On each page is a Back and Next button. At a certain point in the initialization of the app, I determine a navigational structure; what benefit is first, second, etc., therefore, which page to display first, second and so on.
In session memory I store an array of page URL's and a single value called "ThisPage". So if "ThisPage" = 3, I look at URLs(3) and it'll say something like "LTD.aspx". This is the Next button code:
URLs = Session("URLs") Session("ThisPage") += 1 Response.Redirect(URLs(Session("ThisPage")))
This works better than I expected. I could have ALMOST used a single page for everything. Anyways, this works flawlessly until someone hits the Browser back button. We go back but since I didn't click MY back button, the above values never get updated and the navigation is thrown out of sync. I could 'browser back' 4 times from page 6 to page 2 and my session tracking still thinks we're on page 6. If we hit next it goes to Page 7, not 3.
How does one deal with this? Is there some way of knowing the user hit the browser's back button so I could execute MY back button's code and keep the navigation in sync?
Or are there better methods for dynamic navigation?
(I'd rather not disable the browser history and the browser back button functionality, it seems sloppy to me)
Thanks! :)
I put this in every page in the project. I can use the back button as
much as I please. Did I miss something?
On 28 Apr 2005 19:04:47 -0700, da********@gmail.com wrote: Solution to the Back button problem for IE 5.5 and above.
1) Get rid of the cache
Response.CacheControl = "no-cache"; Response.AddHeader("Pragma", "no-cache");
2) set SmartNavigation = true
Daniel Roth MCSD.NET
Tom wilson wrote: I'm developing an application that is a benefits enrolment website. The benefits can be of any type in any order as stored in a SQL server. On each page is a Back and Next button. At a certain point in the initialization of the app, I determine a navigational structure; what benefit is first, second, etc., therefore, which page to display first, second and so on.
In session memory I store an array of page URL's and a single value called "ThisPage". So if "ThisPage" = 3, I look at URLs(3) and it'll say something like "LTD.aspx". This is the Next button code:
URLs = Session("URLs") Session("ThisPage") += 1 Response.Redirect(URLs(Session("ThisPage")))
This works better than I expected. I could have ALMOST used a single page for everything. Anyways, this works flawlessly until someone hits the Browser back button. We go back but since I didn't click MY back button, the above values never get updated and the navigation is thrown out of sync. I could 'browser back' 4 times from page 6 to page 2 and my session tracking still thinks we're on page 6. If we hit next it goes to Page 7, not 3.
How does one deal with this? Is there some way of knowing the user hit the browser's back button so I could execute MY back button's code and keep the navigation in sync?
Or are there better methods for dynamic navigation?
(I'd rather not disable the browser history and the browser back button functionality, it seems sloppy to me)
Thanks! :) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: bigbinc |
last post by:
Is there a way to check for the back button? There has got to be a
way with either vbscript/javascript. I could place redirect pages
in there or some creative? any ideas?
|
by: VB Programmer |
last post by:
I have a cmd button on my ASPX form. On my local machine it works
perfectly. After I upload it to the server I click on the button and
NOTHING - doesn't post back to the server.
Any ideas?
...
|
by: Shimon Sim |
last post by:
Hi,
Every time I write ASP.NET application I have the same problem - Back button
on the browser is my enemy. I have to tell client avoid using "Back" button
and if you use it make sure to refresh...
|
by: Robert Megee |
last post by:
I've been able to essentially disable the back button on IE6 by
expiring the cache. I would like to do the same for the browser
that runs on pocketPC. I believe it is IE4. However this technique...
|
by: Tony Doyle |
last post by:
All,
I have a web form with 3 embedded panels, all working fine.
However, I have now added a Checkbox where autopostback=true, and only the
ascx pages on my page appear, none of the panels /...
|
by: Sridhar |
last post by:
Hi,
I have a question regarding the Page_Load method and Back Button of
Internet explorer. I have created a webform. In that webform I have several
Text Boxes. Also I have two buttons. When I...
|
by: MattB |
last post by:
I have an asp.net 1.1 eCommerce application that has a product page
where the user can select from many different options that affect the
price of the main product. I've implemented this with...
|
by: mrboyer79 |
last post by:
hello all,
i'm having an issue where the back button i created (not the browser back) is causing me to lose data. allow me to explain:
i have three pages. page one is a short form where the user...
|
by: =?Utf-8?B?V2ViQnVpbGRlcjQ1MQ==?= |
last post by:
I the page knows there was a cross post back. but i can not find the control.
(asp.net 3.5)
calling page has a master
calling control:
<asp:Button ID="btnSendAlert" runat="server" Text="Go"...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: giovanniandrean |
last post by:
The energy model is structured as follows and uses excel sheets to give input data:
1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
|
by: Teri B |
last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course.
0ne-to-many. One course many roles.
Then I created a report based on the Course form and...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM)
Please note that the UK and Europe revert to winter time on...
|
by: nia12 |
last post by:
Hi there,
I am very new to Access so apologies if any of this is obvious/not clear.
I am creating a data collection tool for health care employees to complete. It consists of a number of...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
|
by: isladogs |
last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, Mike...
|
by: GKJR |
last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...
| |