Posted on: 4/10/2014 9:41:36 PM | Views : 411

Is there any way of setting up the columns before transfering the GridView to a Access 2010 accdb database file.
GridView1.AllowPaging = False GridView1.DataBind() Try Response.AddHeader("content-disposition", String.Format("attachment; filename={0}", "test.accdb")) Response.Charset = "" Response.ContentType = "application/ms-access" Dim sw As System.IO.StringWriter = New StringWriter() Dim htw As HtmlTextWriter = New HtmlTextWriter(sw) GridView1.RenderControl(htw) form.Attributes("runat") = "server" form.Controls.Add(GridView1) Controls.Add(form) form.RenderControl(htw) Response.Write(sw.ToString()) Response.Flush() Response.End() Catch ex As Exception TextBox1.Text = ...

Go to the complete details ...