title: How to control hyperlink fields in gridview in asp.net?
body: <p>I have a gridview in my asp.net page. Here it is:</p>
  
  <p><img src="https://i.stack.imgur.com/FeofE.jpg" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/XNkJE.jpg" alt="enter image description here"></p>
  
  <p>Here is what i want to do: I have a database that keeps the information about which student is registered to which course. So by using that database, when a hyperlink is clicked, i first want to take coursename, coursecode, and term of the specific row that was clicked, and then make the query and show the seach results in another gridview. But i do not know how to take the values of specific rows and columns, for example how to take the value of Row(1)Col(1), when clicked the first view student list link. Here is the gridview code:</p>
  
  <pre><code>&lt;asp:GridView ID="instCourses" runat="server" 
      onselectedindexchanged="instCourses_SelectedIndexChanged"&gt;
      &lt;Columns&gt;
          &lt;asp:HyperLinkField HeaderText="Registered Students" 
              NavigateUrl="InstViewCourses.aspx" Text="View Student List" /&gt;
      &lt;/Columns&gt;
  &lt;/asp:GridView&gt;
  </code></pre>
  
  <p>Can anyone help me with this? Thanks.</p>