Forum Moderators: open

Message Too Old, No Replies

vbscript redirect to dynamic URI vbscript?

I need to redirect to a dynamic URI

         

KRMwebdesign

11:25 am on Oct 1, 2009 (gmt 0)

10+ Year Member



Is there any way of redirecting to a dynamic URI in vbscript?

I've been using response.redirect but as far as I know that doesn't support dynamic URIs.

I'm basically using an if then response.rediect but it's not working.

Any help would be much appreciated.
Kevin.

mattur

11:35 am on Oct 1, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Dim myID
myID = 2
Response.Redirect("/mydynamicurl.asp?id=" & myID)

Don't be afraid to try this stuff out for yourself. A quick test page takes seconds and can be a better learning tool than asking a forum for answers. HTH.

KRMwebdesign

2:41 pm on Oct 1, 2009 (gmt 0)

10+ Year Member



No you misunderstand. The myID part should be dynamic so it would be myID = (RsUsers("ID")). I've tried it a number of ways but I keep getting an error saying 'syntax error, missing operator. I'm no pro at vbscript.

I was under the impression from reading a few articles that the response.redirect didn't support dynamic variables. I was wondering if there is another way of doing it?

mattur

4:28 pm on Oct 1, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Sorry, that came out harsher than I intended. I just meant that with a bit of testing and a few response.write()'s it's often easier to resolve these things yourself, rather than asking on a forum.

Especially when you haven't provided any code... ;)