title: how to pass checkbox checked row index to javascript from gridview
body: <p>I have a gridview and i want to pass rowindex value to javascript. I tried with following code but its not working.</p>
  
  <p>In Gridview</p>
  
  <pre><code>&lt;asp:TemplateField&gt;
       &lt;ItemTemplate&gt;
          &lt;asp:CheckBox ID="chkSelect" runat="server"  onclick="javascript:return checkSts('&lt;%# DataBinder.Eval(Container.DataItemIndex) %&gt;')" /&gt;
       &lt;/ItemTemplate&gt;
  &lt;/asp:TemplateField&gt; 
  </code></pre>
  
  <p>In Javascript:</p>
  
  <pre><code>function checkSts(i) {  alert(i); }
  </code></pre>