title: How to programmatically get the DataNavigateUrlFields property from a HyperLinkField control
body: <p>In my ASP.NET Web Forms I would like to get the <code>DataNavigateUrlFields</code> from the <code>HyperLinkField</code> control.</p>
  
  <p>In order to get the control I use the following code in the <code>RowDataBound</code> event:</p>
  
  <pre><code>If e.Row.Cells(n).Controls(0).GetType().ToString() = "System.Web.UI.WebControls.HyperLink" Then
       Dim linkDownload As HyperLink = DirectCast(e.Row.Cells(n).Controls(0), HyperLink)
  </code></pre>
  
  <p>The problem is that I get an <strong>HyperLink</strong> already "filled" so the <code>DataNavigateURLFormatString</code> (<code>myPage.aspx?downloadId = {0}</code>) and <code>DataNavigateUrlFields</code> (<code>downloadGuid</code>) are already combined in the <code>HyperLink.NavigateUrl</code> property.</p>
  
  <p>Is there any way to get the <code>DataNavigateUrlFields</code> property? In case there is not, is there any function to extract the <strong>downloadGuid</strong> value from <code>HyperLink.NavigateUrl</code> (in short treating the <strong>NavigateUrl</strong> as a <strong>QueryString</strong>)?</p>
  
  <p>VB is preferred but also answers in C# are appreciated</p>