Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jun 2002
    Location
    Delhi, India
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to pass values in query string??

    Hi!,
    Thanks for your help so far. I have been able to cover a long way. One more query here.
    Am using ASP,HTML,Javascript,MS-SQL. My problem is when a particular ASP page is

    submitted, it calls another ASP page, which redirects the control to another ASP page depending

    upon the choice passed. Am trying to pass few values through query string and am using

    <!#INCLUDE.........--> directive. I have not been able to succeed so far. Is it possible to

    pass query string while using include directive. How do I do it? There are five values which I

    want to pass in the query string.
    My syntax is:-

    <!-- #INCLUDE VIRTUAL="/somefolder/xyz.asp?firstvar=value1&secondvar=value2" -->
    Thanks in advance.
    -Navin.

  • #2
    New Coder
    Join Date
    Jun 2002
    Location
    Pilipinas
    Posts
    89
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hi

    not sure if I got you right, but ...

    ... when you submit a form using post (even to another .asp page specified in the <form action= ... > attribute), you can get the values passed to the page using Request.Form.

    ... when you submit a form using get (even to another .asp page specified in the <form action= ... > attribute), you can get the values passed to the page using Request.QueryString.

    ... you do not have to manually pass the query string parameters if the values are from the form input controls. They are sent with the form data set.

  • #3
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    Originally posted by ReyN
    hi

    not sure if I got you right, but ...

    ... when you submit a form using post (even to another .asp page specified in the <form action= ... > attribute), you can get the values passed to the page using Request.Form.

    ... when you submit a form using get (even to another .asp page specified in the <form action= ... > attribute), you can get the values passed to the page using Request.QueryString.

    ... you do not have to manually pass the query string parameters if the values are from the form input controls. They are sent with the form data set.
    Yeah you got it right.

    So like:

    Form.asp:
    Code:
    <p>
    <FORM action="processor.asp" method="Post">
    <INPUT name="Text"><BR />
    <INPUT type="Submit" Value="Submit">
    </FORM></P>
    processor.asp:
    Code:
    <p>You entered <%=Request.Form("Text")%> in the form on the previous page!</p>

    FYI, serverside includes are executed first before any other code.
    OracleGuy


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •