|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
redirecting to URL through IF statement
I'm new to VB and was wondering if this can be done. I want to redirect to a new URL if all fields are filled correctly.
Here's my existing code. <% If request("error")="1" then Response.Write "You must fill complete the first name, last name and e-mail fields." Else If request("error")="2" then Response.Write "A person with that e-mail address has already completed the survey. Please try another." Else If request("success")="1" then Response.Write "You have successfully completed our survey." End If End If End If %> I'd like to redirect to a different URL instead of Response.Write "You have successfully completed our survey." I just can't seem to find the correct syntax for this function, can anyone help me? Thanks in advance. |
|
#2
|
||||
|
||||
|
Try this it should work fine...instead of response.write try
response.redirect "http://www.domain.com/newpage.asp" Last edited by werD : February 28th, 2005 at 11:37 PM. Reason: Youull need quotes around the address |
|
#3
|
|||
|
|||
|
Quote:
That worked great. Thanks. |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > redirecting to URL through IF statement |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|