如何在 MS Access 中导出 gridview?
我正在使用此代码
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();
但是这个代码文件没有在 MS 访问中打开我该怎么办?