title: If Else Statement -- 'If' operator requires either two or three operands
body: <p><strong>Aim:</strong> To show comments, but limit to 25 characters plus 3 dots. The dots would only show if over 25 characters. In addition we would show a tooltip so the user can see the full text if required.</p>
  
  <p>I have tried with and without the tooltip. There's no error in Visual Studio just on the website. </p>
  
  <p><strong>Issue:</strong>  'If' operator requires either two or three operands.</p>
  
  <p><strong>Code:</strong> </p>
  
  <pre><code>  &lt;asp:TemplateField HeaderText="Recommendations" SortExpression="Recommendations"&gt;
                          &lt;ItemTemplate&gt;
                              &lt;asp:Label ID="lblRecommendations" runat="server" Text='&lt;%# If(Len(Eval("Recommendations").ToString()) &gt; 25, Left(Eval("Recommendations").ToString(), 25) + "...", Eval("Recommendations").ToString() %&gt;' ToolTip='&lt;%# Eval("Recommendations") %&gt;' /&gt;
                          &lt;/ItemTemplate&gt;
                      &lt;/asp:TemplateField&gt;
  </code></pre>
  
  <p><strong>Notes:</strong></p>
  
  <p>I have some working If statements already which work such as the below so assume I have a comma or bracket misplaced?;</p>
  
  <pre><code>  &lt;asp:TemplateField HeaderText="Next Survey Due" SortExpression="NEXTSURVEYDUE"&gt;
                          &lt;ItemTemplate&gt;
                              &lt;asp:Label ID="lblNEXTSURVEYDUE" runat="server" Text='&lt;%# If(Eval("NEXTSURVEYDUE", "{0:d}") = "01/01/1900", " ", Eval("NEXTSURVEYDUE", "{0:d}")) %&gt;' /&gt;
                         &lt;/ItemTemplate&gt;
                      &lt;/asp:TemplateField&gt;
  </code></pre>