title: get the serverside control id in javascript in asp.net?
body: <p>I have asp:ImageButton in asp:table.
  I want to get the id of button in javascript and I want to enabled the button based on conditon. How cloud I acheive.
  I tried as below.</p>
  
  <pre><code>var btn;
  btn = document.getElementById('&lt;%= generateRptbtn.ClientID%&gt;').value;
  btn.enabled = true;
  </code></pre>
  
  <p>But I'm getting empty as btn value.</p>