title: download link in html table
body: <p>Previously I could download files from gridview and code in GridView1_RowCommand </p>
  
  <p>code is </p>
  
  <pre><code> protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
      {
          if (e.CommandName == "cmd")
          {
              string filename = e.CommandArgument.ToString();
              string path = MapPath("~/Docfiles/" + filename);
              byte[] bts = System.IO.File.ReadAllBytes(path);
              Response.Clear();
              Response.ClearHeaders();
              Response.AddHeader("Content-Type", "Application/octet-stream");
              Response.AddHeader("Content-Length", bts.Length.ToString());
              Response.AddHeader("Content-Disposition", "attachment; filename=" +
              filename);
              Response.BinaryWrite(bts);
              Response.Flush();
  </code></pre>
  
  <p>but now 
  I create a table and show some data and I want a download link in table 
  here is table code...</p>
  
  <pre><code>&lt;div class="CSSTableGenerator" &gt;
              &lt;table border="0" width="100%" cellpadding="0" cellspacing="0" 
                id="results"&gt;
              &lt;asp:Repeater ID="Repeater1" runat="server"&gt;
              &lt;HeaderTemplate&gt;
                  &lt;tr&gt;
                      &lt;td&gt;
                         Document ID
                      &lt;/td&gt;
                      &lt;td &gt;
                          Document Name
                      &lt;/td&gt;
                      &lt;td&gt;
                          File Uploaded
                      &lt;/td&gt;
                      &lt;td&gt;
                         Document Type
                      &lt;/td&gt;
  
                  &lt;/tr&gt;
                  &lt;/HeaderTemplate&gt;
                  &lt;ItemTemplate&gt;
                  &lt;tr&gt;
                  &lt;%--&lt;td&gt;&lt;asp:LinkButton ID="LinkButton1" runat="server"
                  CommandArgument='&lt;%# Eval("FileUploaded") %&gt;' 
             CommandName="cmd"&gt;Download&lt;/asp:LinkButton&gt;&lt;/td&gt;--%&gt;
                  &lt;td&gt;&lt;%#DataBinder.Eval(Container.DataItem,"DocumentID") %&gt;&lt;/td&gt;
  
                  &lt;td&gt;&lt;%#DataBinder.Eval(Container.DataItem, "
                       DocumentName")%&gt; &lt;/td&gt;
                  &lt;td&gt;&lt;%#DataBinder.Eval(Container.DataItem,
                                  "FileUploaded")%&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;%#DataBinder.Eval(Container.DataItem, 
                        "Document")%&gt;&lt;/td&gt;
                  &lt;/tr&gt;
                  &lt;/ItemTemplate&gt;
                  &lt;/asp:Repeater&gt; 
                  &lt;div id="pageNavPosition" &gt;
                  &lt;/div&gt;              
              &lt;/table&gt;
              &lt;/div&gt;
  </code></pre>
  
  <p>now how do I add a download link in table and what I write instead of GridView1_RowCommand ????</p>
  
  <p>any solution?</p>