Use data binding in the NavigateUrl attribute, for example:
NavigateUrl = '<%# Bind("ClientWebSite") %>'
Or more fully:
<asp:HyperLinkField DataTextField='<%# Bind("Client" %>' HeaderText="Client" NavigateUrl='<%# Bind("ClientWebSite") %>'> <HeaderStyle HorizontalAlign="Center" /> <ItemStyle HorizantalAlign="Left" /> </asp:HyperLinkField>
DataNavigateUrlFields
used to get or set field names from the data source used to create URLs for hyperlinks in a HyperLinkField object.
'DataNavigateUrlFormatString` is used to get or set a string that defines the format in which URLs for hyperlinks are displayed in a HyperLinkField object.
source share