title: how to send client id of a row of gridview to javascript
body: <p>I have a <code>GridView</code> with some information in it. When I click on one of the rows, I want to send its <code>ClientId</code> to JavaScript.</p>
  
  <p>C# code:</p>
  
  <pre><code>protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
  {
      e.Row.Attributes.Add("onclick", "javascript:ChangeRowColor('" + e.Row.ClientID + "')");
  }
  </code></pre>
  
  <p>JavaScript:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      function ChangeRowColor(row) {
          alert(row);
  &lt;/script&gt;
  </code></pre>
  
  <p>but the problem is that when I click on a row it returns <code>"gridview1"</code>, and that isn't the row's ID.
  How can I send a <code>GridView</code> row ID to JavaScript?</p>