469,287 Members | 2,576 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,287 developers. It's quick & easy.

Syntax? passing url parameters in asp

Hi,

I have some troubles with the correct syntax, hope to get some help.
This is the intention:
This is the code I'd like to use.

url: http://webserver/ta.asp?artnr=04001

Code ta.asp:
strSql = "Select * from ta where ta_nr = %artnr%"
<!-- include file = "%artnr% & .asp"-->

Thx in advance
Jul 19 '05 #1
7 17492


TNGgroup wrote:
I have some troubles with the correct syntax, hope to get some help.
This is the intention:
This is the code I'd like to use.

url: http://webserver/ta.asp?artnr=04001


In ASP code you can read
Request.QueryString("artnr")

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 19 '05 #2
cant use a variable as an inclide name since the includes happen first.
There is a bunch of stuff on www.aspfaq.com on this but basically you have
to include them all but only parse the needed one....

if Req.Que("var") = "1" then
<include>
else
<include>
end if

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"TNGgroup" <tn*@tnggroup.com> wrote in message
news:41*********************@news.skynet.be...
Hi,

I have some troubles with the correct syntax, hope to get some help.
This is the intention:
This is the code I'd like to use.

url: http://webserver/ta.asp?artnr=04001

Code ta.asp:
strSql = "Select * from ta where ta_nr = %artnr%"
<!-- include file = "%artnr% & .asp"-->

Thx in advance

Jul 19 '05 #3
thx, works, but the include file, still doesn't work ?
any suggustion on this one

artfilename = Request.QueryString("artnr")
<!-- include file = response.write(artfilename) & " .asp"-->

"Martin Honnen" <ma*******@yahoo.de> wrote in message
news:Oy**************@tk2msftngp13.phx.gbl...


TNGgroup wrote:
I have some troubles with the correct syntax, hope to get some help.
This is the intention:
This is the code I'd like to use.

url: http://webserver/ta.asp?artnr=04001


In ASP code you can read
Request.QueryString("artnr")

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 19 '05 #4
Hmm.. ok than we try it this way...

Thx

"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:uc**************@TK2MSFTNGP11.phx.gbl...
cant use a variable as an inclide name since the includes happen first.
There is a bunch of stuff on www.aspfaq.com on this but basically you have
to include them all but only parse the needed one....

if Req.Que("var") = "1" then
<include>
else
<include>
end if

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"TNGgroup" <tn*@tnggroup.com> wrote in message
news:41*********************@news.skynet.be...
Hi,

I have some troubles with the correct syntax, hope to get some help.
This is the intention:
This is the code I'd like to use.

url: http://webserver/ta.asp?artnr=04001

Code ta.asp:
strSql = "Select * from ta where ta_nr = %artnr%"
<!-- include file = "%artnr% & .asp"-->

Thx in advance


Jul 19 '05 #5
http://www.aspfaq.com/show.asp?id=2042

Bob Barrows
TNGgroup wrote:
thx, works, but the include file, still doesn't work ?
any suggustion on this one

artfilename = Request.QueryString("artnr")
<!-- include file = response.write(artfilename) & " .asp"-->

"Martin Honnen" <ma*******@yahoo.de> wrote in message
news:Oy**************@tk2msftngp13.phx.gbl...


TNGgroup wrote:
I have some troubles with the correct syntax, hope to get some help.
This is the intention:
This is the code I'd like to use.

url: http://webserver/ta.asp?artnr=04001


In ASP code you can read
Request.QueryString("artnr")

--

Martin Honnen
http://JavaScript.FAQTs.com/


--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 19 '05 #6
I checked the article, now the Server.Execute("2.htm") command
works fine, I'm just thinking, is it not possible to send a variable to
this command like Server.Execute("<variable>" & ".htm") or is it the same
as include file command ?

TNGgroup

"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message
news:OT**************@TK2MSFTNGP11.phx.gbl...
http://www.aspfaq.com/show.asp?id=2042

Bob Barrows
TNGgroup wrote:
thx, works, but the include file, still doesn't work ?
any suggustion on this one

artfilename = Request.QueryString("artnr")
<!-- include file = response.write(artfilename) & " .asp"-->

"Martin Honnen" <ma*******@yahoo.de> wrote in message
news:Oy**************@tk2msftngp13.phx.gbl...


TNGgroup wrote:

I have some troubles with the correct syntax, hope to get some help.
This is the intention:
This is the code I'd like to use.

url: http://webserver/ta.asp?artnr=04001

In ASP code you can read
Request.QueryString("artnr")

--

Martin Honnen
http://JavaScript.FAQTs.com/


--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.

Jul 19 '05 #7
Yes, a variable can be used. See the example in online help which can be
found at:
http://msdn.microsoft.com/library/en...m_seromexe.asp

Bob Barrows
TNGgroup wrote:
I checked the article, now the Server.Execute("2.htm") command
works fine, I'm just thinking, is it not possible to send a variable
to this command like Server.Execute("<variable>" & ".htm") or is it
the same as include file command ?

TNGgroup

"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message
news:OT**************@TK2MSFTNGP11.phx.gbl...
http://www.aspfaq.com/show.asp?id=2042

Bob Barrows
TNGgroup wrote:
thx, works, but the include file, still doesn't work ?
any suggustion on this one

artfilename = Request.QueryString("artnr")
<!-- include file = response.write(artfilename) & " .asp"-->

"Martin Honnen" <ma*******@yahoo.de> wrote in message
news:Oy**************@tk2msftngp13.phx.gbl...
TNGgroup wrote:

> I have some troubles with the correct syntax, hope to get some
> help. This is the intention:
> This is the code I'd like to use.
>
> url: http://webserver/ta.asp?artnr=04001

In ASP code you can read
Request.QueryString("artnr")

--

Martin Honnen
http://JavaScript.FAQTs.com/


--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get
a quicker response by posting to the newsgroup.


--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 19 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

699 posts views Thread by mike420 | last post: by
37 posts views Thread by Bengt Richter | last post: by
3 posts views Thread by domeceo | last post: by
2 posts views Thread by Ed Jay | last post: by
9 posts views Thread by toton | last post: by
8 posts views Thread by Brian C | last post: by
2 posts views Thread by csmith8933 | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.