Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old February 28th, 2005, 03:57 PM
belair58 belair58 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 3 belair58 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 49 m 27 sec
Reputation Power: 0
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.

Reply With Quote
  #2  
Old February 28th, 2005, 11:36 PM
werD's Avatar
werD werD is offline
Certified Abuser
ASP Free Beginner (1000 - 1499 posts)
 
Join Date: Jan 2005
Location: Line 73 ---^
Posts: 1,046 werD User rank is First Lieutenant (10000 - 20000 Reputation Level)werD User rank is First Lieutenant (10000 - 20000 Reputation Level)werD User rank is First Lieutenant (10000 - 20000 Reputation Level)werD User rank is First Lieutenant (10000 - 20000 Reputation Level)werD User rank is First Lieutenant (10000 - 20000 Reputation Level)werD User rank is First Lieutenant (10000 - 20000 Reputation Level)werD User rank is First Lieutenant (10000 - 20000 Reputation Level)werD User rank is First Lieutenant (10000 - 20000 Reputation Level)  Folding Points: 20652 Folding Title: Starter FolderFolding Points: 20652 Folding Title: Starter Folder
Time spent in forums: 1 Week 4 Days 20 h 37 m 12 sec
Reputation Power: 127
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

Reply With Quote
  #3  
Old March 1st, 2005, 09:41 AM
belair58 belair58 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 3 belair58 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 49 m 27 sec
Reputation Power: 0
Quote:
Originally Posted by werD
Try this it should work fine...instead of response.write try
response.redirect "<A href="http://www.domain.com/newpage.asp"[/QUOTE" target=_blank>http://www.domain.com/newpage.asp"


That worked great.

Thanks.

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > redirecting to URL through IF statement


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT