473,320 Members | 1,694 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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 17693


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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

699
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro...
37
by: Bengt Richter | last post by:
ISTM that @limited_expression_producing_function @another def func(): pass is syntactic sugar for creating a hidden list of functions. (Using '|' in place of '@' doesn't change the picture...
3
by: domeceo | last post by:
can anyone tell me why I cannot pass values in a setTimeout function whenever I use this function it says "menu is undefined" after th alert. function imgOff(menu, num) { if (document.images) {...
12
by: Joel | last post by:
Hi all, Forgive me if I've expressed the subject line ill. What I'm trying to do is to call a c++ function given the following: a. A function name. This would be used to fetch a list of...
21
by: Dmitry Anikin | last post by:
I mean, it's very convenient when default parameters can be in any position, like def a_func(x = 2, y = 1, z): ... (that defaults must go last is really a C++ quirk which is needed for overload...
2
by: Ed Jay | last post by:
I have two functions, one of which is called from within the other, which is called from an HTML page. The called function is passed parameters that I'd like to pass to the argument calling the...
9
by: toton | last post by:
Hi, Which one is the correct syntax for constructor for static memory allocation Object obj("param"); or Object obj = Object("param"); 1) For the first one, how compiler checks it as not a...
8
by: Brian C | last post by:
Hello all, I have a question regarding syntax, coming from a C background. In C, if I had a function like this: char *ParseDelimitedString(char *String,int DelimitedNumber,char *Retval,int...
2
by: csmith8933 | last post by:
How do I write a function where the number of parameters it takes varies? This is what I have but it doesnt work. // function prototype void functionThree(int num1=1, int num2=2, int num3=3);...
6
Soniad
by: Soniad | last post by:
Hello, I am excecuting a stored procedure in my ASP page , it has one out parameter (@confirm) . after executing the procedure i want to retreive this out parameter and assign it to variable...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.