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

Re: How to translate value in URL by z

z
Sun Jan 04 15:04:52 CST 2004


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, m.krechting@chello.nl (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