VB.net to C# conversion in asp.net
<p>I am very new at this area. I have script written in vb.net but I want to convert in C# but it is not working as the vb.net code.so please help.</p>

<pre><code>&lt;asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="2"
            ForeColor="#333333" GridLines="None" AllowPaging="True"&gt;
            &lt;Columns&gt;
                &lt;asp:TemplateField&gt;
                    &lt;ItemTemplate&gt;
                        &lt;asp:LinkButton ID="lnkdownload" runat="server" Text="Download" CommandName="Download"
                            CommandArgument='&lt;%#Eval("FullName") +";" + Eval("Name") %&gt;'&gt;&lt;/asp:LinkButton&gt;
                    &lt;/ItemTemplate&gt;
                &lt;/asp:TemplateField&gt;
                &lt;asp:BoundField DataField="Name" HeaderText="File Name" /&gt;
                &lt;asp:BoundField DataField="Length" HeaderText="Size (Bytes)" /&gt;
            &lt;/Columns&gt;
            &lt;FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" /&gt;
            &lt;RowStyle BackColor="#F7F6F3" ForeColor="#333333" /&gt;
            &lt;PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" /&gt;
            &lt;SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" /&gt;
            &lt;HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" /&gt;
            &lt;EditRowStyle BackColor="#999999" /&gt;
            &lt;AlternatingRowStyle BackColor="White" ForeColor="#284775" /&gt;
        &lt;/asp:GridView&gt;
</code></pre>

<p>.</p>

<pre><code>Private Sub BindGrid()
    Dim DataDirectory As String = "~/Uploads"

    Dim files() As FileInfo = New DirectoryInfo(Server.MapPath(DataDirectory)).GetFiles
    GridView1.DataSource = files
    GridView1.DataBind()


End Sub
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    If Not IsPostBack Then
        BindGrid()
    End If
End Sub

Private Sub Downloadfile(ByVal fileName As String, ByVal FullFilePath As String)
    Response.AddHeader("Content-Disposition", "attachment; filename=" &amp; fileName)
    Response.TransmitFile(FullFilePath)
    Response.End()
End Sub

Protected Sub GridView1_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles GridView1.RowCommand
    If e.CommandName = "Download" Then
        Dim fileInfo() As String = e.CommandArgument.ToString().Split(";")
        Dim FileName As String = fileInfo(1)
        Dim FullPath As String = fileInfo(0)
        Downloadfile(FileName, FullPath)
    End If
End Sub

Protected Sub GridView1_PageIndexChanging(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewPageEventArgs) Handles GridView1.PageIndexChanging
    GridView1.PageIndex = e.NewPageIndex
    BindGrid()

End Sub
</code></pre>
