title: Using inline C# code with serverside html tags
body: <p>is it possible to use inline <code>c#</code> code (i.e. <code>&lt;%# someFunction(someParameter) %&gt;</code>) in serverside html tags? The reason I ask is that I do this sort of thing with a regular <code>&lt;div&gt;</code> tag and it works well, but as soon as I add the following code it passes the code through with the output html to the client.</p>
  
  <p>Here's my original div tag:</p>
  
  <pre><code>&lt;div class="invoiceUnselected" onclick='select(this,&lt;%# Eval("ID") %&gt;);' &gt;
  </code></pre>
  
  <p>which passes through:</p>
  
  <pre><code>&lt;div class="invoiceSelected" onclick="select(this,271856);"&gt;
  </code></pre>
  
  <p>and the new: </p>
  
  <pre><code>&lt;div id="divInvoiceHeader" runat="server" class="invoiceUnselected"
       onclick='select(this,&lt;%# Eval("ID") %&gt;);' &gt;
  </code></pre>
  
  <p>passes through</p>
  
  <pre><code>&lt;div id="ctl00_bodyCPH_accRenewals_Pane_0_header_divInvoiceHeader"
       class="invoiceUnselected" onclick="select(this,&lt;%# Eval("ID") %&gt;);"&gt;
  </code></pre>