Actually I am binding some data on tooltip of a Image control in gridview.
all is working fine. see my code below
<asp:Image ID="Image1" runat="server" ImageUrl="~/img/images.jpg" ToolTip='<%# (Eval("Comments").ToString().Length == 0? "": "Late Reason - " + DataBinder.Eval(Container.DataItem, "Comments")) + (Eval("Out_Comments").ToString().Length == 0? "" :"| Out Reason - "+ DataBinder.Eval(Container.DataItem, "Out_Comments")) %>' />
my requirement is that when Comments field is null or blank in database then this extra text "Late Reason - " should remove from the tool tip and if the Comments field is not blank or null then this extra text should be there in tooltip. And it also does same for the Out_Comments field which is having extra text "Out Reason - ".
how can I do this?