Reputation: 46232
I have the following HyperLinkField:
<asp:HyperLinkField DataTextField="SysID" DataNavigateUrlFields="SysID"
DataNavigateUrlFormatString="pgmtasklist.aspx?sysid={0}" Text="Click Here" />
I need the hyperlink text to say Click Here but not working as expected. It shows the actual SysID.
Upvotes: 2
Views: 1471
Reputation: 1213
Remove the DataTextField definition and it should work:
<asp:HyperLinkField DataNavigateUrlFields="SysID"
DataNavigateUrlFormatString="pgmtasklist.aspx?sysid={0}" Text="Click Here" />
Since you have DataTextField it's expecting a DataTextFormatString
value as well, but in your case you don't need either.
Upvotes: 3