How to translate value in URL

Discussion in 'ASP General' started by Krechting, Jan 4, 2004.

  1. Krechting

    Krechting Guest

    Hi All,

    I have a nagging problem.
    I try to put a value of the autonumber field of a record into a string
    so it can be read in a new page.
    In the first form I use in HTML the following:

    JavaScript:window.open('Weapon_related.asp?<%=myAutoNum%>...... etc
    When I open the page I get an error and in the properties I read this:

    http://localhost/Weapon2000/Weapon_related.asp?<%=myAutoNum%>

    Where it should say:
    http://localhost/Weapon2000/Weapon_related.asp?26

    In ASP code I have written:
    MyAutoNum = Recordset.Fields("txtWID") ---> where txtWID is the autonum field.
    for example 26.

    How do I get the code to return the actual number (26) instead of <%=myAutoNum%>


    This would help a great deal
    Marco
    The Netherlands
     
    Krechting, Jan 4, 2004
    #1
    1. Advertising

  2. Krechting

    Brynn Guest

    Most of the people that read the db group also read the general ...
    there is no need to multi-post the same question :)


    On 4 Jan 2004 01:57:56 -0800, (Krechting) wrote:

    >Hi All,
    >
    >I have a nagging problem.
    >I try to put a value of the autonumber field of a record into a string
    >so it can be read in a new page.
    >In the first form I use in HTML the following:
    >
    >JavaScript:window.open('Weapon_related.asp?<%=myAutoNum%>...... etc
    >When I open the page I get an error and in the properties I read this:
    >
    >http://localhost/Weapon2000/Weapon_related.asp?<%=myAutoNum%>
    >
    >Where it should say:
    >http://localhost/Weapon2000/Weapon_related.asp?26
    >
    >In ASP code I have written:
    >MyAutoNum = Recordset.Fields("txtWID") ---> where txtWID is the autonum field.
    >for example 26.
    >
    >How do I get the code to return the actual number (26) instead of <%=myAutoNum%>
    >
    >
    >This would help a great deal
    >Marco
    >The Netherlands
     
    Brynn, Jan 4, 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. Sridhar Hegde
    Replies:
    2
    Views:
    2,571
    Ajeetha Kumari
    Sep 13, 2004
  2. Jon paugh
    Replies:
    1
    Views:
    949
  3. =?Utf-8?B?anRob3JuYnk=?=

    Translate a filename to a URL

    =?Utf-8?B?anRob3JuYnk=?=, Apr 11, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    1,965
    Brock Allen
    Apr 11, 2005
  4. Just D.
    Replies:
    0
    Views:
    554
    Just D.
    Aug 11, 2004
  5. Tim Fröglich

    Getting ID, calling url, search for value, return value

    Tim Fröglich, Jan 7, 2006, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    154
    Josh Twist
    Jan 10, 2006
Loading...

Share This Page