Connecting Tech Pros Worldwide Forums | Help | Site Map

Syntax? passing url parameters in asp

TNGgroup
Guest
 
Posts: n/a
#1: Jul 19 '05
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



Martin Honnen
Guest
 
Posts: n/a
#2: Jul 19 '05

re: Syntax? passing url parameters in asp




TNGgroup wrote:
[color=blue]
> 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[/color]

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



--

Martin Honnen
http://JavaScript.FAQTs.com/
Curt_C [MVP]
Guest
 
Posts: n/a
#3: Jul 19 '05

re: Syntax? passing url parameters in asp


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" <tng@tnggroup.com> wrote in message
news:412add43$0$320$ba620e4c@news.skynet.be...[color=blue]
> 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
>
>[/color]


TNGgroup
Guest
 
Posts: n/a
#4: Jul 19 '05

re: Syntax? passing url parameters in asp


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" <mahotrash@yahoo.de> wrote in message
news:OywkI#diEHA.1644@tk2msftngp13.phx.gbl...[color=blue]
>
>
> TNGgroup wrote:
>[color=green]
> > 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[/color]
>
> In ASP code you can read
> Request.QueryString("artnr")
>
>
>
> --
>
> Martin Honnen
> http://JavaScript.FAQTs.com/[/color]


TNGgroup
Guest
 
Posts: n/a
#5: Jul 19 '05

re: Syntax? passing url parameters in asp


Hmm.. ok than we try it this way...

Thx

"Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
news:ucfIGBeiEHA.1344@TK2MSFTNGP11.phx.gbl...[color=blue]
> 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" <tng@tnggroup.com> wrote in message
> news:412add43$0$320$ba620e4c@news.skynet.be...[color=green]
> > 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
> >
> >[/color]
>
>[/color]


Bob Barrows [MVP]
Guest
 
Posts: n/a
#6: Jul 19 '05

re: Syntax? passing url parameters in asp


http://www.aspfaq.com/show.asp?id=2042

Bob Barrows
TNGgroup wrote:[color=blue]
> 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" <mahotrash@yahoo.de> wrote in message
> news:OywkI#diEHA.1644@tk2msftngp13.phx.gbl...[color=green]
>>
>>
>> TNGgroup wrote:
>>[color=darkred]
>>> 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[/color]
>>
>> In ASP code you can read
>> Request.QueryString("artnr")
>>
>>
>>
>> --
>>
>> Martin Honnen
>> http://JavaScript.FAQTs.com/[/color][/color]

--
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.


TNGgroup
Guest
 
Posts: n/a
#7: Jul 19 '05

re: Syntax? passing url parameters in asp


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]" <reb01501@NOyahoo.SPAMcom> wrote in message
news:OT9qSLeiEHA.3428@TK2MSFTNGP11.phx.gbl...[color=blue]
> http://www.aspfaq.com/show.asp?id=2042
>
> Bob Barrows
> TNGgroup wrote:[color=green]
> > 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" <mahotrash@yahoo.de> wrote in message
> > news:OywkI#diEHA.1644@tk2msftngp13.phx.gbl...[color=darkred]
> >>
> >>
> >> 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/[/color][/color]
>
> --
> 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.
>
>[/color]


Bob Barrows [MVP]
Guest
 
Posts: n/a
#8: Jul 19 '05

re: Syntax? passing url parameters in asp


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:[color=blue]
> 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]" <reb01501@NOyahoo.SPAMcom> wrote in message
> news:OT9qSLeiEHA.3428@TK2MSFTNGP11.phx.gbl...[color=green]
>> http://www.aspfaq.com/show.asp?id=2042
>>
>> Bob Barrows
>> TNGgroup wrote:[color=darkred]
>>> 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" <mahotrash@yahoo.de> wrote in message
>>> news:OywkI#diEHA.1644@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/[/color]
>>
>> --
>> 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.[/color][/color]

--
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.


Closed Thread