SQL PHP HTML ASP JavaScript articles and free scripts to download
 

Redirecting user by using response object in ASP

We can do header redirection in ASP by using Response object. Read the basics of header redirection requirements in different condition. Response object takes the url of the site to which the browser is to be redirected. It can be any full URL like http:www. sitename.com or it can be a relative url if within the site. Here is the basic syntax of the Response.Redirect

Response.Redirect "http://www.sitename.com"


We can't apply redirect command if we have already posted any data to the browser. In such a case ASP engine will return error like this .

Response object error 'ASP 0156 : 80004005'
Header Error
redirect.asp, line 15
The HTTP headers are already written to the client browser. Any HTTP header modifications must be made before writing page content.


So we have to take care that our redirection command should work before any data is posted to browser.

Read on header redirection examples in PHP here
Further readings
Configuring IIS to run website in local PC
ASP Introduction
ASP Installations
Basic File structure for simple ASP script
Advantage Disadvantage of ASP
Tasks ASP Can do
Buffer On or Off in ASP to control data flow to client browser
Different requirement for redirecting users
Response Object in header redirecting of browser
Escaping double quotes and printing to screen
 
Scripts
PHP
JavaScript
All ASP Tutorials
Popular Tutorials
Managing two drop downs
ASP Tutorials
Date and time
Declaring array
Form in ASP
Server.MapPath
Date Time & MSSQL
Select Query
File System Object
Subscribe
Submit your email address and receive article and product notifications. Your email is safe with us.