want to open the files in another page may be image, text, doc, PDF etc, when the link(filename) is clicked, in asp.net c#
<p>I am making an application which shares files to the user in asp.net c#...
I have a grid with column username and filename with a link</p>

<p>Now I want that when I click on filename(can be text, images, doc, PDF) the file should open on different page</p>

<p><strong>My code for aspx page is as below</strong></p>

<pre><code> &lt;asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="3"
        CssClass="grid" BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" 
        BorderWidth="1px" onrowcommand="GridView1_RowCommand"&gt;
        &lt;RowStyle ForeColor="black" /&gt;
        &lt;Columns&gt;
            &lt;asp:TemplateField HeaderText="File Name"&gt;
                &lt;ItemTemplate&gt;
                    &lt;asp:Label ID="Label1" runat="server" Text='&lt;%# Bind("FileName") %&gt;'&gt;&lt;/asp:Label&gt;
                &lt;/ItemTemplate&gt;
                &lt;HeaderStyle HorizontalAlign="Left" /&gt;
            &lt;/asp:TemplateField&gt;
            &lt;asp:TemplateField HeaderText="Who shared"&gt;
                &lt;ItemTemplate&gt;
                    &lt;asp:Label ID="Label3" runat="server" Text='&lt;%# Bind("UserName") %&gt;'&gt;&lt;/asp:Label&gt;
                &lt;/ItemTemplate&gt;
                &lt;HeaderStyle HorizontalAlign="Left" /&gt;
                &lt;ItemStyle Width="200px" /&gt;
            &lt;/asp:TemplateField&gt;

            &lt;asp:TemplateField ShowHeader="False"&gt;
                &lt;ItemTemplate&gt;
                    &lt;asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandArgument='&lt;%#((GridViewRow)Container).RowIndex%&gt;'
                        Text='&lt;%# Bind("FileName") %&gt;' CommandName="ViewImages" &gt;&lt;/asp:LinkButton&gt;
                &lt;/ItemTemplate&gt;
            &lt;/asp:TemplateField&gt;
        &lt;/Columns&gt;
        &lt;FooterStyle BackColor="White" ForeColor="#000066" /&gt;
        &lt;PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" /&gt;
        &lt;SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" /&gt;
        &lt;HeaderStyle BackColor="black" Font-Bold="True" ForeColor="White" /&gt;
    &lt;/asp:GridView&gt;
</code></pre>

<p>How to open the file in other page so that user can see the content of files online????</p>
