title: Asp.Net(C#) inline coding Eval if statement
body: <p><strong>Hi all;</strong></p>
  
  <p><strong>How to make inline eval if control ?</strong></p>
  
  <pre><code>&lt;asp:TemplateField HeaderText="Name"&gt;
                  &lt;ItemTemplate&gt;
                      &lt;%# if(Eval("Bla Bla Bla").ToString().Length &lt;= 15){Eval("Bla Bla Bla")}else{Eval("Bla Bla Bla").ToString().Substring(0,15)}%&gt;
                  &lt;/ItemTemplate&gt;
              &lt;/asp:TemplateField&gt;
  </code></pre>