|
 |
asp_web_howto thread: Injecting ASP into a sub
Message #1 by jonathan@j... on Wed, 18 Sep 2002 11:56:11
|
|
(apologies for posting twice, but the subject field on the P2P site was
blank somehow!?!)
The code I'm working on uses a sub to create a link to a url and accepts
various parameters - one of those being the url.
I need to attach values to the querystring of the url, but one of those
needs to be from ASP and I can't seem to get the syntax right.
Here's what I'm trying to do:
<%
Call someRoutine("somepage.asp?x=", "param2", "param3")
%>
Basically I need to be able to insert a value for x.
Obviously I can't do:
<%
Call someRoutine("somepage.asp?x=<%=i%>", "param2", "param3")
%>
Any ideas?
Jonathan
Message #2 by "Tom Zhang" <tzhang@p...> on Fri, 20 Sep 2002 13:35:14
|
|
You may build a complete URL before passing into it.
<%
MyURL="somepage.asp?x=" & i
call someRoutin(myURL, "param2", "param3")
%>
if someRoutin is a Sub, no bracket is required.
Tom
> (apologies for posting twice, but the subject field on the P2P site was
b> lank somehow!?!)
> The code I'm working on uses a sub to create a link to a url and accepts
v> arious parameters - one of those being the url.
I> need to attach values to the querystring of the url, but one of those
n> eeds to be from ASP and I can't seem to get the syntax right.
> Here's what I'm trying to do:
> <%
> Call someRoutine("somepage.asp?x=", "param2", "param3")
%> >
> Basically I need to be able to insert a value for x.
> Obviously I can't do:
<> %
> Call someRoutine("somepage.asp?x=<%=i%>", "param2", "param3")
%> >
> Any ideas?
>
J> onathan
|
|
 |