Passing Values from Page to Page

Discussion in 'ASP General' started by syrOrange, Oct 13, 2004.

  1. syrOrange

    syrOrange Guest

    I have the following

    pn = rs("PrinterName")
    I put a response.write (PN) and it displays the correct print name

    Later down the code I put in
    <input type="hidden" name="PN" value=" & PN & ">
    <input type="submit" value="Add Maintenance Record" name="cmdAddMaint"
    onClick="window.open('addMaint.asp','addWindow','width=500,height=300')">

    Then on the AddMaint.ASP page I have

    PN = Request.Form("PN")

    I am unable to view the value of PN on this page.

    Any ideas?
    syrOrange, Oct 13, 2004
    #1
    1. Advertising

  2. syrOrange wrote:
    > I have the following
    >
    > pn = rs("PrinterName")
    > I put a response.write (PN) and it displays the correct print name
    >
    > Later down the code I put in
    > <input type="hidden" name="PN" value=" & PN & ">


    No. you need to response.write the value of PN into the html:

    <input type="hidden" name="PN" value="<%=PN%>">

    <%= is shorthand for response.write


    Bob Barrows
    --
    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], Oct 13, 2004
    #2
    1. Advertising

  3. syrOrange

    James Guest

    Do you have what you wrote or:

    <input type="hidden" name="PN" value="<%Response.Write(PN)%>">


    "syrOrange" <> wrote in message
    news:...
    > I have the following
    >
    > pn = rs("PrinterName")
    > I put a response.write (PN) and it displays the correct print name
    >
    > Later down the code I put in
    > <input type="hidden" name="PN" value=" & PN & ">
    > <input type="submit" value="Add Maintenance Record" name="cmdAddMaint"
    > onClick="window.open('addMaint.asp','addWindow','width=500,height=300')">
    >
    > Then on the AddMaint.ASP page I have
    >
    > PN = Request.Form("PN")
    >
    > I am unable to view the value of PN on this page.
    >
    > Any ideas?
    >
    >
    >
    >
    James, Oct 13, 2004
    #3
  4. syrOrange

    syrOrange Guest

    Bob,

    And I should have known that, sorry to both you.
    Thanks for the assistance.

    "Bob Barrows [MVP]" <> wrote in message
    news:...
    > syrOrange wrote:
    > > I have the following
    > >
    > > pn = rs("PrinterName")
    > > I put a response.write (PN) and it displays the correct print name
    > >
    > > Later down the code I put in
    > > <input type="hidden" name="PN" value=" & PN & ">

    >
    > No. you need to response.write the value of PN into the html:
    >
    > <input type="hidden" name="PN" value="<%=PN%>">
    >
    > <%= is shorthand for response.write
    >
    >
    > Bob Barrows
    > --
    > 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.
    >
    >
    syrOrange, Oct 13, 2004
    #4
    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. Bruno Alexandre
    Replies:
    1
    Views:
    722
    James Westgate
    Nov 5, 2003
  2. =?Utf-8?B?Y2hyaXM=?=

    passing values from page to page

    =?Utf-8?B?Y2hyaXM=?=, Apr 12, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    351
    Shock
    Apr 12, 2004
  3. Miguel Dias Moura
    Replies:
    4
    Views:
    2,264
  4. Ganesh

    passing values to other page

    Ganesh, Mar 18, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    432
  5. Replies:
    4
    Views:
    22,300
    Mirunalini
    Jun 24, 2011
Loading...

Share This Page