set value for DataNavigateUrlFormatString dynamically

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 %>" />
 
S

Scott Mitchell [MVP]

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!
 
T

TJS

That only seems to work for a container field
I need something like this:

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,273
Latest member
DamonShoem

Latest Threads

Top