set value for DataNavigateUrlFormatString dynamically

  • Thread starter Thread starter TJS
  • Start date Start date
T

TJS

how can I dynamically set the value of DataNavigateUrlFormatString in a
hyperlink column
I have the value to use, I need the correct syntax .

"<%= %>" isn't working

<asp:HyperLinkColumn
Text="View"
DataNavigateUrlField="field1"
DataNavigateUrlFormatString="<%= dynamic value goes in here %>" />
 
TJS said:
how can I dynamically set the value of DataNavigateUrlFormatString in a
hyperlink column
I have the value to use, I need the correct syntax .

"<%= %>" isn't working

<asp:HyperLinkColumn
Text="View"
DataNavigateUrlField="field1"
DataNavigateUrlFormatString="<%= dynamic value goes in here %>" />

Use:

DavaNavigateUrlFormatString='<%# ... %>'

There are some good FAQs you might want to check out on HyperLinkColumns
under the Hyperlinks section at: http://datawebcontrols.com/faqs/

Happy programming!

--

Scott Mitchell
(e-mail address removed)
http://www.4GuysFromRolla.com
http://www.ASPFAQs.com
http://www.ASPMessageboard.com

* When you think ASP, think 4GuysFromRolla.com!
 
That only seems to work for a container field
I need something like this:

<asp:HyperLinkColumn
Text="View"
DataNavigateUrlField="field1"
DataNavigateUrlFormatString="<%=
ConfigurationSettings.AppSettings("myvalue") %>"
/>
 
Back
Top