Groups | Blog | Home
all groups > asp.net > january 2005 >

asp.net : Request.QueryString



Sonny Sablan
1/29/2005 10:47:28 PM
Why doesn't this work? And how do I do something similar to this. I want =
to actually build the value into a hyperlink on the receiving page.

<script runat=3Dserver>
Dim Cat As String =3D Request.QueryString("CatID")

</script>

<HTML>
<BODY>

<%Response.Write(Cat)%>

</BODY>
</HTML>


Thanks

Sonny=20
Joerg Jooss
1/29/2005 11:57:53 PM
[quoted text, click to view]

Why don't you go the ASp.NET way and use a HTML control or a HyperLink
control?

Cheers,
--
http://www.joergjooss.de
Nathan Sokalski
1/30/2005 3:07:04 AM
Just a guess, but it probably interprets the part between the scripts as =
Javascript, but the Response.Write(Cat) as VBScript. I would suggest =
putting them both together, there is no reason to separate them. do =
something like:

<%Response.Write(Request.QueryString("CatID"))%>

and just ditch the script tags and the stuff between them. Note: I am =
just assuming this from what I can tell from your code, but if you are =
an ASP programmer rather than an ASP.NET programmer, you might get more =
help at the following newsgroups:

microsoft.public.inetserver.asp.general
microsoft.public.inetserver.asp.db
microsoft.public.inetserver.asp.components
--=20
Nathan Sokalski
njsokalski@hotmail.com
www.nathansokalski.com
[quoted text, click to view]
Why doesn't this work? And how do I do something similar to this. I =
want to actually build the value into a hyperlink on the receiving page.

<script runat=3Dserver>
Dim Cat As String =3D Request.QueryString("CatID")

</script>

<HTML>
<BODY>

<%Response.Write(Cat)%>

</BODY>
</HTML>


Thanks

Sonny=20
AddThis Social Bookmark Button