W
Wayne Wengert
I want to use the contents of one field to be the text the user clicks on
for a hyperlink in a datagrid. I am trying the following code but it does
not work. What is the correct syntax for this? The field "InfoURL" contains
the hyperlink and the field "City" is a string field containing the text I
want the user to be able to clock on.
<columns>
<asp:BoundColumn HeaderText="Start Date" DataField="StartDate"
DataFormatString="{0:d}" />
<asp:BoundColumn HeaderText="Max<br>Perc<br>Units" DataField="MaxLoc" />
<asp:HyperlinkColumn
HeaderText="Info URL"
DataNavigateURLField="InfoURL"
Text=<%# Container.DataItem("City") %>.ToString />
</columns>
Wayne
for a hyperlink in a datagrid. I am trying the following code but it does
not work. What is the correct syntax for this? The field "InfoURL" contains
the hyperlink and the field "City" is a string field containing the text I
want the user to be able to clock on.
<columns>
<asp:BoundColumn HeaderText="Start Date" DataField="StartDate"
DataFormatString="{0:d}" />
<asp:BoundColumn HeaderText="Max<br>Perc<br>Units" DataField="MaxLoc" />
<asp:HyperlinkColumn
HeaderText="Info URL"
DataNavigateURLField="InfoURL"
Text=<%# Container.DataItem("City") %>.ToString />
</columns>
Wayne