title: Referencing a linkbutton within a gridview thats inside a AJAX tab
body: <p>On my home page i have roughly 10 grids that sit inside ajax tabs etc </p>
  
  <p>One grid in particular has a link button called "Archive" when the user clicks this I need to show a seperate div with a textbox where the user has to enter a reason in to why they wont to Archieve the selected information, but my problem is this how can i get the name and Email of the row that needs to be archieved using Jquery, i want to get this information store it in hidden fields and then reference the hidden fields from code behind etc.</p>
  
  <p>I tried to use the asp:ModalPopUp extender but as this grid is placed inside a ajax tab the modal pop up extender complains that it can see the control the link button so iv decided to user Jquery to get the the two fields name and number can someone help me to achieve this? </p>
  
  <p>Below is the one grid which I need to get the name and email address when the link button is pressed</p>
  
  <p><code></p>
  
  <pre><code> &lt;asp:HiddenField ID="hdnUserFullName" runat="server"/&gt;
      &lt;asp:HiddenField ID="hdnUserEmail" runat="server" /&gt;
  
       &lt;div id="MainContent_TabControl_body" class="ajax__tab_body" style="height: 100%;
                      display: block;"&gt;
                      &lt;div id="MainContent_TabControl_tb2" id="MainContent_TabControl_tb2" class="ajax__tab_panel"&gt;
                          &lt;div&gt;
                              &lt;table cellspacing="0" class="tablesorter" id="MainContent_TabControl_tb2_GrdViewUsers"
                                  style="border-collapse: collapse;"&gt;
                                  &lt;thead&gt;
                                      &lt;tr&gt;
                                          &lt;th scope="col"&gt;
                                              &amp;nbsp;
                                          &lt;/th&gt;
                                          &lt;th scope="col"&gt;
                                              Full Name
                                          &lt;/th&gt;
                                          &lt;th scope="col"&gt;
                                              Email
                                          &lt;/th&gt;
                                          &lt;th scope="col"&gt;
                                              Exam Taken
                                          &lt;/th&gt;
                                          &lt;th scope="col"&gt;
                                              Date Taken
                                          &lt;/th&gt;
                                          &lt;th scope="col"&gt;
                                              Exam Total
                                          &lt;/th&gt;
                                      &lt;/tr&gt;
                                  &lt;/thead&gt;
                                  &lt;tbody&gt;
                                      &lt;tr&gt;
                                          &lt;td&gt;
                                              &lt;a id="MainContent_TabControl_tb2_GrdViewUsers_Edit_0" href="javascript:__doPostBack(&amp;#39;ctl00$MainContent$TabControl$tb2$GrdViewUsers$ctl02$Edit&amp;#39;,&amp;#39;&amp;#39;)"&gt;
                                                  Archieve&lt;/a&gt;
                                          &lt;/td&gt;
                                          &lt;td&gt;
                                              &lt;a id="MainContent_TabControl_tb2_GrdViewUsers_HyperFullName_0" href="/Authentication/ExamPaper.aspx?uid=1"&gt;
                                                  Scott Atkinson&lt;/a&gt;
                                          &lt;/td&gt;
                                          &lt;td&gt;
                                              &lt;span id="MainContent_TabControl_tb2_GrdViewUsers_lblEmail_0"&gt;Scott.test@hotmail.co.uk&lt;/span&gt;
                                          &lt;/td&gt;
                                          &lt;td&gt;
                                              &lt;span id="MainContent_TabControl_tb2_GrdViewUsers_lblExamTaken_0"&gt;True&lt;/span&gt;
                                          &lt;/td&gt;
                                          &lt;td&gt;
                                              &lt;span id="MainContent_TabControl_tb2_GrdViewUsers_lblDateTaken_0"&gt;30-06-2012&lt;/span&gt;
                                          &lt;/td&gt;
                                          &lt;td&gt;
                                              &lt;span id="MainContent_TabControl_tb2_GrdViewUsers_lblExamTotal_0"&gt;0&lt;/span&gt;
                                          &lt;/td&gt;
                                      &lt;/tr&gt;
                                  &lt;/tbody&gt;
                              &lt;/table&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
  </code></pre>
  
  <p></p>
  
  <p></code></p>
  
  <p>This is my Jquery So far, iv put an alert in there to make sure its hitting the script and it is.....</p>
  
  <p><code></p>
  
  <pre><code>$(document).ready(function () {
  
      $('#MainContent_TabControl_tb2_GrdViewUsers_Edit_0').click(function () {
          alert('hello');
          $('#dvArchive').show();
          $('#MainContent_hdnUserFullName').val() == 'Value of the grid view column';
          $('#MainContent_hdnUserEmail').val() == 'Email Value from the column';
      });
  
  });
  </code></pre>
  
  <p></code></p>
  
  <p>Just need some help referencing the Full name column and the email column to populate the hidden fields with the values of the row that needs to be archived.....</p>
  
  <p>Update this is my Revised Jquery</p>
  
  <p>Any help would be appreciated.......
  <code></p>
  
  <pre><code> $(document).ready(function () {
              $('.ClickMe').click(function () {
                  var tr = $(this);
                  var UserName;
                  var Email;
                  UserName == tr.find('.UserName').text();
                  Email == tr.find('Email').text();
  
                  $('#MainContent_hdnUserFullName').val() == UserName;
                  $('#MainContent_hdnUserEmail').val() == Email;
  
                  return false;
              });
  
          });
  </code></pre>
  
  <p></code></p>
  
  <p>Iv given the link button the classname .ClickMe for testing purposes aswell as Full Name has the class .Username and Email as the class .Email</p>