Solved

C# ASP redirect to homepage on going back

Posted on 2012-04-07
7
398 Views
Last Modified: 2013-12-17
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
Comment
Question by:pauledwardian
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 20

Assisted Solution

by:BuggyCoder
BuggyCoder earned 166 total points
ID: 37818548
0
 
LVL 75

Assisted Solution

by:käµfm³d 👽
käµfm³d   👽 earned 167 total points
ID: 37819029
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
 

Assisted Solution

by:pauledwardian
pauledwardian earned 0 total points
ID: 37820321
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
 
LVL 16

Accepted Solution

by:
theo kouwenhoven earned 167 total points
ID: 37845850
Hi  pauledwardian,

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

Regards,
Murph
0
 

Author Closing Comment

by:pauledwardian
ID: 37923301
Thanks
0

Featured Post

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Error in Visual Project 10 49
Change background images after 5 seconds. 12 48
How to get the range for the percentage from user input. 4 27
Javascript function 3 22
FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question