By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,665 Members | 1,251 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,665 IT Pros & Developers. It's quick & easy.

Syntax? passing url parameters in asp

P: n/a
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
Share this Question
Share on Google+
7 Replies


P: n/a


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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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.