Different requirement for redirecting users

Server-side redirects are useful when the destination is determined by application logic rather than by a link the visitor clicked. Common cases include successful form processing, access control, login flows, and moving a visitor to a canonical or replacement page.

Server side form validation

We submit a form with data and we can design a server side form validation to check the user entered data. If the data entered by the user is not in required format or not as per standards then we may ask the visitor to feed the data again. So here we will send back the visitor to the same form page again showing the error message and asking the visitor to try again.

Sending users to different sections based on the permission level
In a portal we may have different areas marked for different types for users and we want the users to go directly to assigned area after they submit their identity ( may be by login ) . Here without any trigger from user end system will redirect the user to a page for there use.

End of a process.

Some time after submitting a data or after a forum posting you want the visitor to be redirected to display a Thank You message. We can have a common thank you page or an error page where we can redirect the browser.

We will discuss header redirection here. Read more on the same topic in PHP section header redirection.

Header Redirection precaution

A redirect changes HTTP response headers. Decide the redirect before output has been flushed to the browser. With buffering enabled, generated content can still be held on the server until the redirect decision is made.



Here is the common error message given by ASP engine if header is already sent and script example of header redirection using Response object.
ASP Home






✖
We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles Contact us
© 2000-2026 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer