04 Oct 2007 @ 2:01 PM 
 

asp:HyperLink With Dynamic URLs

 

Much headache to get this to work. The following format will allow dynamic url with multiple variables in the query string in a itemtemplate.

<asp:HyperLink ID=”HyperLink1″ runat=”server”
Text=”Link Text”
Target=”_blank”
NavigateUrl=’<%# “~/mypage.aspx?var1=”+ Eval(”Var1″) + “&var2=” + Eval(”var2″)%>’>
</asp:HyperLink>

NOTE: Make sure any literal between <%# and %> uses double quotes NOT single quotes.

Other methods for handling dynamic NavigateUrl

Tags Categories: Coding, asp.net Posted By: frank
Last Edit: 04 Oct 2007 @ 02 01 PM

E-mailPermalink
 

Responses to this post » (None)

 


Comments are open. Feel free to leave a comment below.


 

Leave A Comment ...

 

 XHTML:
You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
\/ More Options ...
Change Theme...
  • Role »
  • Posts »
  • Comments »
Change Theme...
  • VoidVoid (Default)
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire
  • LiteLightweight