title: Setting a style color based on an if/else
body: <pre><code>&lt;td nowrap valign="top"&gt;
  &lt;input class="formsubmit" id="btnGo" type="button" value="Show Description" 
  style = "&lt;%# If (DataBinder.Eval(Container, "DataItem.Exclamation").ToString() == "1")
  then Response.Write("color:red") 
  Else Response.Write("color:black") EndIf%&gt;" 
  OnClick="btnShowDescription('&lt;%#DataBinder.Eval(Container, "DataItem.ListingDescription")%&gt;');" /&gt;
  &lt;/td&gt;
                          `
  </code></pre>
  
  <p>This is the code for a cell on my table. I'm trying to get it to work but there's a compiler issue saying that I'm missing a closed parentheses which I'm not. (hopefully). Can anyone see what the error could be? I thought I did the if/else logic right. Basically I'm trying to set the font color of a button based on what the value of a certain item in a database.</p>