Open pdf from hyperlink in gridview
<p>want to open pdf file when a user clicks on hyperlink shown in gridview column.The name of the file is taken from first column of the gridview where file titles are stored.</p>

<p> </p>

<p>hovering over hyperlink in gridview shows file link, but when clicked it doesnot open pdf file,</p>

<pre><code>protected void Gridview1_RowDataBound(object sender, GridViewRowEventArgs e)
{

 if (e.Row.RowType == DataControlRowType.DataRow)
        {
            HyperLink hlink = (HyperLink)e.Row.FindControl("HL");
            string url = "~/Docs/" + e.Row.Cells[1].Text +".pdf";
            hlink.NavigateUrl = url;
            hlink.Text = "Read";
        } 
 }
</code></pre>

<p>The following error comes when hyperlink is clicked, as it is not able to open pdf file.</p>

<blockquote>
  <p>The resource cannot be found. 
  Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable</p>
</blockquote>

<p>which event is called when hyperlink is clicked in a gridview, maybe pdf application is to be opened there. Please suggest. Thanks in adavance.</p>
