问题描述
string Constring = ConfigurationManager.ConnectionStrings [MyCon] .ConnectionString;
SqlConnection sqlcon = new SqlConnection(Constring);
SqlCommand sqlCom = new SqlCommand(Select *来自tblGallery,sqlcon);
sqlcon.Open();
DataSet ds = new DataSet();
SqlDataAdapter da = new SqlDataAdapter(sqlCom);
DataTable dt = new DataTable();
da.Fill(dt);
dt.TableName =Gallery ;
ds.Tables.Add(dt);
我有数据集中的数据,现在我要生成html文件包含数据集中的数据,
html文件应该自动保存在文件夹中,并且还会在单击事件中邮寄该html文件的附件。请帮助
string Constring = ConfigurationManager.ConnectionStrings["MyCon"].ConnectionString;
SqlConnection sqlcon = new SqlConnection(Constring);
SqlCommand sqlCom = new SqlCommand("Select * from tblGallery", sqlcon);
sqlcon.Open();
DataSet ds = new DataSet();
SqlDataAdapter da = new SqlDataAdapter(sqlCom);
DataTable dt = new DataTable();
da.Fill(dt);
dt.TableName = "Gallery";
ds.Tables.Add(dt);
I have the data in dataset,now i want to generate html file of containing data present in dataset,
that html file should automatically save in folder and also mailed with attachment of that html file on single click event..Please help
这篇关于如何将数据集导出到html文件并保存在文件夹中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!