When you use the Redirect method of the Response object, you provide the URL as an argument to the method.
Syntax
Use the following syntax for the Redirect method:Response. Redirect URL
The URL specifies the absolute or relative location to which the Web browser is redirected.
NoteIf you use the Redirect method after information has already been sent to the user , an error message will be generated.
Example
This example uses the Redirect method to display a page in high or low resolution, depending on the screen resolution of the user's computer:<% If Request.ServerVariables("HTTP_UA_PIXELS") = "640x480" Then Response.Redirect "lo_res.htm" Else Response.Redirect "hi_res.htm" End If %>
To determine whether or not the form requests an ASP, test the HTML controls to see if they contain values. If the controls do not contain values, the user has not yet submitted the form; therefore, you need to display a blank form that the user can complete and submit.
Example
This example displays a blank form:
<% If IsEmpty (Request("txtName")) Then ' Display form Else ' Form was submitted End If %>