How handle null value using object in C# ASP.NET C#.
Below I am doing visible true and false base on condition using hyperlink.
<asp:Label ID="Label3" runat="server" Text="Date not confirm"
Visible='<%#GetVisible2(Eval("DateofEvent").ToString()=="")%>'></asp:Label>
below is my c# code.
public bool GetVisible2(object value)
{
if (value=="")
{
//return value.ToString() == "Visible";
return true;
}
return false;
}
Every time returning false only. I dont know if condition is correct or wrong.