title: ASP.NET User control Eval() DB.Null problem
body: <p>I have a user control that contains a repeater. The repeater outputs either one or two columns based on the parameters used when an instance of it is created.</p>
  
  <p>If a value is not specified for the second column i.e only one column should be displayed, it doesn't seem to like it if a value hasn't been set.</p>
  
  <p>I'm trying to output a string that is set in the user control code behind, not a data item.</p>
  
  <p>I have the following aspx:</p>
  
  <pre><code>&lt;%# Eval(Column2Data) == DBNull.Value ? "&lt;/tr&gt; " : String.Format("&lt;td&gt;{0}&lt;/td&gt;&lt;/tr&gt;", Eval(Column2Data))%&gt;
  </code></pre>
  
  <p>If <code>Column2Data</code> has a value, it works but if it doesn't the following error is displayed:</p>
  
  <pre><code>Value cannot be null.
  Parameter name: expression
  </code></pre>
  
  <p>Any ideas why this isn't working?</p>