title: How can i open file in MS access which is created by asp.net in .mdb format
body: <p>How can i export gridview  in MS Access?</p>
  
  <p>I am using this code </p>
  
  <pre><code> Response.ClearContent();
   Response.Buffer = true;
   Response.AddHeader("content-disposition", string.Format("attachment; filename={0}", "Details.mdb"));
   Response.ContentType = "application/ms-access";
   StringWriter sw = new StringWriter();
   HtmlTextWriter htw = new HtmlTextWriter(sw);
   DataGrid dGrid = new DataGrid();
   dGrid.AllowPaging = false;
   dGrid.DataSource = dt;
   dGrid.DataBind();
   dGrid.RenderControl(htw);
   Response.Write(sw.ToString());
   Response.End();
  </code></pre>
  
  <p>but by this code file not open in MS access
  What should i do?</p>