title: GridView OnSelectedIndexChanged call JavaScript function
body: <p>Can I call a JS function on the SelectedIndexChanged event of a GridView? 
  I referred these 2 SO posts -
  <a href="https://stackoverflow.com/questions/9714906/call-jquery-function-on-onselectedindexchanged">Post 1</a> and 
  <a href="https://stackoverflow.com/questions/4973340/call-javascript-function-from-gridview-rowdeleting-event">Post 2</a> that address this but they aren't helping.</p>
  
  <p>I tried </p>
  
  <pre><code>OnSelectedIndexChanged="selectedindexchanged()"
  </code></pre>
  
  <p>however, in return I recieved -</p>
  
  <pre><code>'ASP.default_aspx' does not contain a definition for 'selectedindexchanged' and no 
  extension method 'selectedindexchanged' accepting a first argument of type  
  'ASP.default_aspx' could be found (are you missing a using directive or an 
  assembly reference?)
  </code></pre>
  
  <p>Can anyone confirm whether this can be done and if it can the right way to do it?</p>