Get selected row id
<p>I am using below jquery to get selected row id</p>

<pre><code>&lt;script src="../Scripts/jquery-1.4.1.min.js" type="text/javascript"&gt;&lt;/script&gt;
      &lt;script type="text/javascript"&gt;
          //MainContent_tbl
          $(document).ready(function () {
              $('#MainContent_tbl tr').click(function (event) {
                  alert(this.id); //trying to alert id of the clicked row          

              });
          });



    &lt;/script&gt;
</code></pre>

<p>My problem is that my table(MainContent_tb) is not static, i need to pass this as variable, any suggestion or remarks would be appreciated.</p>
