• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 464
  • Last Modified:

C# ASP redirect to homepage on going back

This is my first experience with ASP.
How can I code that if the user clicks on Back in IE, it directs him to the main page?

Thanks,
Paul
0
pauledwardian
Asked:
pauledwardian
4 Solutions
 
käµfm³d 👽Commented:
Generally speaking, users clicking the back button means they are not doing anything on your site. Rather they are moving back to a previous page that has been cached (already downloaded) onto their machines. The only way you can do anything related to this action is by way of Javascript, which I believe BuggyCoder has pointed you to. Know that since you will be reliant on Javascript, you will need to have a fallback for users who do not have Javascript enabled (or the obscure browser which either doesn't support the techniques outlined in BuggyCoder's links or doesn't support Javascript at all). Having a notice that states your pages relies on Javascript and not letting anyone continue past the home page may suffice.
0
 
pauledwardianAuthor Commented:
Good tips.
I do a pop up message to users that says the submition is successful(Submition of the form to database) and then if the user clicks on Back (in IE) it shows that messagebox again.
I want that to ignore the messagebox on going back and instead directs to the main page.
I heard about Post Back but since this is my first ASP project, I have no idea what that does!!
What do you guys think?

Paul
0
 
MurpheyApplication ConsultantCommented:
Hi  pauledwardian,

Don't go for the Backbutton-stuff, use AJAX script to build your pages.

Regards,
Murph
0
 
pauledwardianAuthor Commented:
Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now