Hidden value

Discussion in 'ASP General' started by JimS, Jul 15, 2004.

  1. JimS

    JimS Guest

    Hello
    I seem to be having a problem with saving hidden values. I am trying to use
    the
    hidden values to post infomation back to the same page and also to a
    different
    second page. I would like to persit the values to a couple of more pages in
    this
    process. I have ten different values that I am trying to save. The problem
    is
    I dont see these Request objects on the second page.
    I have another .asp page that is included and processed on this second page
    (<!--#include file=SP1.asp-->).
    Do I need to pass the request items to this include file and to the real
    page?
    I must be doing something wrong however I am not quite sure what I must me
    doing wrong.

    This a snippet from the original page.

    <tr>
    <td width="33%" align="right">Region:&nbsp;</td>
    <td align=left width="66%">
    <input type="text" name="txtRegion" id="txtRegion" value=<%= strRegion %>
    ></td>

    </tr>

    <Input Type="hidden" Name="VendorRegion" Value
    ='"<%=Request.form("txtRegion")%>">'
    ........
    </form>
    </BODY>
    </HTML>


    This a snippet from the second page. I am trying to grab the value here so
    that I can
    use this value on the page.

    strRegion = trim(Request.form("VendorRegion").item)
    .......
    <HTML>
    <HEAD>
    <TITLE>

    Thanks for any insight!
    JimS, Jul 15, 2004
    #1
    1. Advertising

  2. JimS

    Luis Guest

    "JimS" <noholycowser21spam@ya_NoJunk_hoo.com> wrote in message news:<>...

    If I got your question correctly you don't need this on the main page:
    > <Input Type="hidden" Name="VendorRegion" Value
    > ='"<%=Request.form("txtRegion")%>">'



    Change this line:
    > strRegion = trim(Request.form("VendorRegion").item)


    To:
    strRegion = trim(Request.form("VendorRegion"))

    The ".item" isn't necessary as the Request.form("VendorRegion") will
    give you the value captured in the 'VendorRegion' field on the main
    page.

    Also, if the 'VendorRegion' field is a list then you don't need the
    trim().
    Luis, Jul 16, 2004
    #2
    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. Bruce W..1

    Best way to keep a hidden value?

    Bruce W..1, Dec 9, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    474
    Scott M.
    Dec 10, 2003
  2. Rick
    Replies:
    3
    Views:
    8,101
    Alexey Smirnov
    Apr 13, 2010
  3. Matt Herson
    Replies:
    8
    Views:
    360
    Matt Herson
    Sep 30, 2003
  4. SolarCanine
    Replies:
    2
    Views:
    253
    SolarCanine
    Sep 20, 2005
  5. Replies:
    6
    Views:
    201
Loading...

Share This Page