Saturday, March 24, 2012

Pass Variable to URL string

I pass the variable in URL string as following:
<P><a id="aSupport" runat="Server" class="nav"href="Support.aspx?HeaderType=<%= headertype%>">Support</a></P>
When I query the string in Support.aspx, it always give me "<%= headertype %>", but not the value of the variable.
How Can I pass the value of the variable to URL string parameter.
Thanks.

Why not use an asp:hyperlink.

Then you can use the code-behind pages to set the link, etc.

Inline code is generally not the best choice.

0 comments:

Post a Comment