protected void Button1_Click(object sender, EventArgs e) { String strConn; strConn = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString; SqlConnection Conn = new SqlConnection(strConn);//定义新的数据连接控件并初始化 Conn.Open();//打开连接 try ... Read More
public static void Export(DataTable Dt, string FileName, HttpResponse Response, bool AppendHeader) { StringBuilder sb = new StringBuilder(); int countOfColumns = Dt.Columns.Count; int countOfRows = Dt.Rows.Count; if (AppendHeader) { ... Read More