Set Date Visible condition in LinkButton Using ASP.NET C# Web Forms. I have a GridView. In GridView Template field using
Visible
LinkButton
GridView
Use this:
In ASPX:
Visible='<%#GetVisible(Eval("BatchDate").ToString())%>'
And in the code behind:
public bool GetVisible(object value) { if (Convert.ToDateTime(value) <= DateTime.Now) { return true; } return false; }