title: Gridview ItemTemplate OnClientClick javascript function with DataItem value as parameter
body: <p>I have a button inside my <code>&lt;ItemTemplate&gt;</code> in GridView and I want to call a javascript function on the <code>OnClientClick</code> of that button passing the DataItem value as a parameter of the javascript function</p>
  
  <pre><code>&lt;ItemTemplate&gt;
      // Labels and Html styles
      ....
      &lt;asp:Button ID="btnEdit" runat="server" Text="Edit" OnClientClick='javascript:CreateEditAddress(&lt;%#Bind("Id") %&gt;);' /&gt;
      &lt;asp:Button ID="btnDelete" runat="server" Text="Delete" /&gt;
  &lt;/ItemTemplate&gt;
  </code></pre>
  
  <p>If I will not put a parameter in <code>CreateEditAddess()</code> this works well but I need the parameter.</p>
  
  <p>I know I can put the OnClientClick event value in OnRowDataBound event of the gridview but I don't want to put it in CodeBehind.  It seems like the server tag is not parsed correctly.</p>
  
  <p>Am I missing something here?</p>