title: how to escape characters when using server side delimiters
body: <p>So, currently, within an asp gridview, I have the following</p>
  
  <pre><code>&lt;span id="btnEdit" runat="server" onclick="ShowEditCriteriaFilterDialog('&lt;%#Eval("intSMCID")%&gt;', '&lt;%#Eval("strDescription")%&gt;')" class="linkText"&gt;Edit&lt;/span&gt;
  </code></pre>
  
  <p>What I'm essentially looking for is the syntax for quotes/double-quotes to actually accomplish this properly, as what I have above doesn't properly work. </p>
  
  <p>First of all, if i encapsulate the entire onclick with single quotes, and not put any other quotes inside, it works for rendering purposes, but when i actually click the link at runtime, nothing happens. </p>
  
  <p>If I encapsulate the entire onclick with double-quotes, like most properties of an ASPX element, it doesn't render properly, and everything after the comma which is after the first &lt;%#Eval %> statement shows up as actual text on the screen. This leads me to believe there needs to be some escaping done to prevent it from thinking the click handler ends somewhere in the middle of that &lt;%#Eval %> statement.</p>
  
  <p>note that if I take away runat="server" and just encapsulate it in double-quotes, that seems to work better...but i need the span to be a server-side control for alot of other functionality I have in the page's code behind where I need to access the control through FindControl</p>