title: C# How do I create a Hyperlink OnClick event on GridView?
body: <p>I'm having trouble creating the GridView I want.
  I would like the user to get inside the website and see the GridView which is attached to a DB.
  Columns are: <code>ID, InsertionTime, Filepath, ProccessedByUser</code>
  Now I want the user to click the filepath he/she would like to process. When he/she clicks the filepath, I want their username (logged in with built-in asp website authentication) to be updated (added) into DB.</p>
  
  <p>My markup is standard and I haven't got to manage with code behind.</p>
  
  <pre><code>&lt;asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
      DataKeyNames="ID" DataSourceID="AccessDataSource1" 
      onselectedindexchanged="GridView1_SelectedIndexChanged"&gt;
      &lt;Columns&gt;
          &lt;asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" 
              ReadOnly="True" SortExpression="ID" /&gt;
          &lt;asp:BoundField DataField="starttime" HeaderText="starttime" 
              SortExpression="starttime" /&gt;
          &lt;asp:HyperLinkField DataNavigateUrlFields="path" DataTextField="path" 
              HeaderText="path" /&gt;
          &lt;asp:BoundField DataField="user" HeaderText="user" SortExpression="user" /&gt;
      &lt;/Columns&gt;
  &lt;/asp:GridView&gt;
  </code></pre>
  
  <p>I tried using HyperlinkField but it doesn't seem to support onlick events.</p>
  
  <p>Any suggestions?
  Thanks.</p>