Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linking to another page within an if statement

Status
Not open for further replies.

xTiamatx

Programmer
Jul 20, 2003
22
0
0
US
hi... I'm new to web design, and everything I have learned comes from the last two days of working with Dreamweaver MX, with javascript and vbscript

if err<>0 then
' Response.Write(err.Description)
Response.Write(&quot;<h3>Account already on File - Duplicate Add</h3>&quot;)
else
Response.Write(&quot;<h3>Account Added</h3>&quot;)
end if

I'm trying to make the to urls.. something like this

if err<>0 then
http:\\else
http:\\end if

they need to immediately link to the page... depending on if an error is returned, anyone have an idea?

Thanks,

Kerry
 
Check out Response.Redirect if you want to go to another page.

This FAQ in the ASP forum has some handy tutorials where you'll find out more about ASP type stuff: faq333-1325

Good luck :)

Posting code? Wrap it with code tags: [ignore]
Code:
[/ignore][code]CodeHere
[ignore][/code][/ignore].
 
awesome!, hehe... I tried it out and it works great! site is fully functional now! thx a lot!

-Kerry
 
Also have a look at this FAQ:

In particular it mentions right at the end that with the latest version of ASP (3.0) you can use Server.Transfer instead of Response.Redirect.

Basically if you use Server.Transfer you won't 'break' stuff like Request.Form(&quot;bla&quot;) in your new page.

Have a look at
for the official line.

Posting code? Wrap it with code tags: [ignore]
Code:
[/ignore][code]CodeHere
[ignore][/code][/ignore].
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top