Tuesday, February 26, 2013

If you want to check null value in aspx value while binding data


<%#Eval("BranchFax") != DBNull.Value ? "Fax:" : ""%>
<%#Eval("BranchFax") != DBNull.Value ? Eval("BranchFax") + ",&nbsp;" : ""%>

<asp:TextBox ID="TextBox1" Height="19" Width="30" runat="server" Text = '<%#Eval("CName") != null ? Eval("CName") : "Not available" %>'></asp:TextBox>

No comments:

Post a Comment