ASP.NET C#: Dynamic text in GridView HyperLinkField
Hello All
I have a GridView on an ASP.NET C# website that contains data from a database. In the GridView I have a HyperLinkField.
What I want to do is change the text of the HyperLinkField depending on the value of one of the GridView Columns (if the column is 0 the HyperLinkField text should be "Activate" and if the value is 1 the text should be "Block").
you can use this
Text='<%# Eval("colname")%> == "1" ? "Yes" : "No"
this is just example