I don't want the label to show if the field is null. In my database rows, data isn't complete for all columns.
I thought this would work:
<% if(# Eval("recipe_by") == null){%><br /><br /><%} else {%>Recipe by:
<br /><br /> <asp:Label ID="recipe_byLabel" Font-Bold="True" runat="server" Text='<%# Eval("recipe_by") %>' /> }
I get this error:
Compiler Error Message: CS1040: Preprocessor directives must appear as the first non-whitespace character on a line
Source Error:
Line 386: Line 387: Line 388:<% if(# Eval("recipe_by") == null){%>
<%} else {%>Recipe by: Line 389:
' /> } Line 390:Compiler Error Message: CS1040: Preprocessor directives must appear as the first non-whitespace character on a line
Source Error:
Line 386: Line 387: Line 388:<% if(# Eval("recipe_by") == null){%>
<%} else {%>Recipe by: Line 389:
' /> } Line 390: