title: asp:Hyperlink in Gridview open PDF in new browser window
body: <p>I currently have a gridview that dynamically creates <code>asp:Hyperlinks</code> to PDF files.  Right now, the url just downloads the file to the local machine.  What's the easiest way to get them to open in a new window so the user has the option to print or download.  Chrome automatically downloads it.  IE asks to open or save it.  I just want it to open in a browser window.</p>
  
  <pre><code>&lt;asp:TemplateField HeaderText="Name"&gt;
      &lt;ItemTemplate&gt;
          &lt;asp:HyperLink ID="lblProductName" runat="server" Text='&lt;%# Eval("name") %&gt;' NavigateUrl="#" Target="_blank"  &gt;&lt;/asp:HyperLink&gt;
      &lt;/ItemTemplate&gt;
  &lt;/asp:TemplateField&gt;
  </code></pre>
  
  <p>And the actual NavigateUrl gets created in the code behind</p>
  
  <pre><code>HyperLink lblProductName = (HyperLink)e.Row.FindControl("lblProductName");
  lblProductName.NavigateUrl = urlLink;
  </code></pre>