tags:

views:

84

answers:

1

I have web page which is passing a querystring parameter to page 2:

<a href="Page2.aspx?WONumber=12345">

On page 2 I want to have an href which passes the same parameter value to page 3. I tried:

<a href="Page3.aspx?WONumber=" + request.querystring("WONumber") >

but that gives me a VS2008 error "attribute 'request.querystring' is not a valid attribute of element 'a'". What should I be doing instead?

+2  A: 

Try this one (I assume ASP.NET/C#):

<a href='Page3.aspx?WONumber=<%=
    HttpUtility.HtmlAttributeEncode(Request.QueryString["WONumber"])%>'>Text</a>
Mehrdad Afshari
You assumed correctly. Thanks!
dsteele