Why not use the brower backbutton?

eramgarden

Contributor
Joined
Mar 8, 2004
Messages
579
I've asked my users not to use the browser backbutton because it would throw off the normal flow of the app..since i have database connectivity and sessions vars that need to be cleared using the right buttons, etc...

but they didnt buy this explanation

What other reason can I give them??
 
Heuuu... tell them that you are not paid enough to make application that strong :p.

No... but without jokes.... but I've never seen a program in which they said : "Don't this thing that way because it'll crash". That mean you know it will crash... so if you know it... fix it.

Connection to your database shall be closed and opened each time (unless it's open at Global level).

If you need help on how to figure things out... post a little thread and we will help you find a better way to do things.
 
I've solved this problem before. Hide the toolbar at the top and you'll solve 95% of your problems. Yeh some people will still use the keyboard to browse the history but if they do its their own fault.
 
Yeah... you can do that. But if you REALLY need that this page been removed from history... you can do a Server.Transfer(....) may cause some problem in some rare case but you can't go back in the history. What you can do... is removing yourself from the history using Javascript. I don't know if it's possible but... It's worth a try.

But I'll use that ONLY if the user shall really NOT go back. Normally... you can design your app in a way that permit the user to go back.

Depend on your problem mostly...
 
I disagree with you here Archangel, because usually when you are going through pages in ASP.NET you're making server calls, so why should be able to go back? Most web applications don't work properly when you do this, its a limitation of the technology...
 
Well... I'm currently doing this kind of app. And... I have a 5 form long process to go by. The user can select, deselect, enter value , remove value but it don't matter if he want to go back. The only thing I don't want him to do is go forward too fast without following the process. I have 1 page called "Confirmation.aspx". This page (when you press "Save") will update the DB with all data collected.

And please give me an exemple of an application that can't work with "Back Button". I want to improve my knowledge of ASP.NET.
 
I have session variables set that when users click "backbutton" wont reset..that's why i dont want them to use the backbutton..

for example, i use a session variable to keep track of a page pop-up. If it's popped once, then i set the session var and it's not popped again... Now, if they use the backbutton, this session var wont be set properly..

someone said to have my own Back Button..
 
You can do it like this... or you reset your Session value. But you can always verify from which page a user come from. That way... if it's not correct... you can redirect it the right way.
 
There are many web-based applications that sh*t the bed if you hit the back button. Off the top of my head I can think of the Wachovia banking site and even the ASP.Net forums. They give you a message about reposting data from the server and then you get an alert box that pops up and asks you to retry. I don't know if their coding is driving this or if it's IE.
Wachovia will dump you out back to the login if you try to go back.
Removing the toolbar helps but many folks have 5 button mices that allow you to trigger a Back.
 
Back
Top