Syntax? passing url parameters in asp

Discussion in 'ASP General' started by TNGgroup, Aug 24, 2004.

  1. TNGgroup

    TNGgroup Guest

    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
     
    TNGgroup, Aug 24, 2004
    #1
    1. Advertising

  2. Martin Honnen, Aug 24, 2004
    #2
    1. Advertising

  3. TNGgroup

    TNGgroup Guest

    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" <> wrote in message
    news:OywkI#...
    >
    >
    > 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/
     
    TNGgroup, Aug 24, 2004
    #3
  4. TNGgroup

    TNGgroup Guest

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

    Thx

    "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
    news:...
    > 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" <> wrote in message
    > news:412add43$0$320$...
    > > 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
    > >
    > >

    >
    >
     
    TNGgroup, Aug 24, 2004
    #4
  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" <> wrote in message
    > news:OywkI#...
    >>
    >>
    >> 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.
     
    Bob Barrows [MVP], Aug 24, 2004
    #5
  6. TNGgroup

    TNGgroup Guest

    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]" <> wrote in message
    news:...
    > 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" <> wrote in message
    > > news:OywkI#...
    > >>
    > >>
    > >> 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.
    >
    >
     
    TNGgroup, Aug 24, 2004
    #6
  7. Yes, a variable can be used. See the example in online help which can be
    found at:
    http://msdn.microsoft.com/library/en-us/iissdk/iis/ref_vbom_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]" <> wrote in message
    > news:...
    >> 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" <> wrote in message
    >>> news:OywkI#...
    >>>>
    >>>>
    >>>> 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.
     
    Bob Barrows [MVP], Aug 24, 2004
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jon paugh
    Replies:
    1
    Views:
    882
  2. anonymous
    Replies:
    1
    Views:
    4,638
    Francisco Padron
    May 8, 2005
  3. Replies:
    4
    Views:
    694
  4. Ramon F Herrera
    Replies:
    8
    Views:
    499
    Pascal J. Bourguignon
    Sep 13, 2009
  5. JB
    Replies:
    6
    Views:
    1,089
Loading...

Share This Page