by creating a public method
You can complete this task very easily like
public string testbind(object myvalue)
{
if (myvalue == null)
{
return "NA value";
}
return myValue.ToString();
}
Label Code:
Or you may use
<%#(String.IsNullOrEmpty(Eval("TypeOfPainting").ToString()) ? "NA" : Eval("TypeOfPainting"))%>
You have to follow this type of scenarion.
Hope it works.