title: If/else logic within a table cell using ASP
body: <p>I'm using an SQL query to gather information from a database and C# + ASP to get it in a table on the front end side. I'm trying to make it so that when I get an item, it will check its value and change the font color it is displayed in based on the value. I'm not sure how the syntax is supposed to work with all the tags so I'm getting weird results. So far it looks like: </p>
  
  <pre><code>&lt;td nowrap valign="top"&gt;
  if (&lt;%# DataBinder.Eval(Container, "DataItem.StreetNumber")%&gt; == "1") {
     &lt;font color = "red"&gt;&lt;%# DataBinder.Eval(Container, "DataItem.StreetNumber")%&gt;&lt;/font&gt;
    }
  else
      &lt;%# DataBinder.Eval(Container, "DataItem.StreetNumber")%&gt;&lt;/td&gt;
  </code></pre>
  
  <p>Hopefully that makes some sense. </p>