title: If statement inside Repeater control
body: <p>Although there are several questions on this topic, I haven't found any satisfactory answers.</p>
  
  <p>I have a Repeater that needs to display complex content. An <code>IF</code> statement is required within the template. I can't move this to the code-behind as I need to have server controls and user controls registered within the repeater. Here is what I need:</p>
  
  <pre><code>&lt;asp:Repeater ID="rCom" runat="server" ClientIDMode="Static"&gt;
      &lt;ItemTemplate&gt;
         &lt;%# If CBool(Eval("IsFix")) Then%&gt;
             &lt;%-- HTML content including server and user controls --%&gt;
         &lt;%Else%&gt;
             &lt;%-- HTML content including server and user controls --%&gt;
         &lt;%End If%&gt;
      &lt;/ItemTemplate&gt;
  &lt;/asp:Repeater&gt;
  </code></pre>
  
  <p>The above throws a compiler error. Any idea on how to achieve this? I need to evaluate the <code>IsFix</code> field in the <code>If</code> statement.</p>