首页 > 代码库 > 888
888
using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;namespace Web.Test._Excel{ using Web.Utils; using System.Data; using System.Data.SqlClient; using System.Drawing; public partial class Default : System.Web.UI.Page { DataSet ds; DataTable dt; protected void Page_Load(object sender, EventArgs e) { string sql = "select top 30 o.* from T_WordInfo o"; ds = HelperDb.ExecuteAll(HelperDb.connStr, CommandType.Text, sql, HelperKeys.DataSet) as DataSet; if (HelperValidate.CheckedDataSet(ds)) { dt = ds.Tables[0]; this.gv01.DataSource = dt = ds.Tables[0]; this.gv01.DataBind(); } } protected void Button1_Click(object sender, EventArgs e) { // ExcelHelper e = new ExcelHelper(); //ExcelHelper.OutputToExcel(dt,"C:\\1.xls"); //MailAttachments ma = new MailAttachments(); //ma.Add(@"C:\1.xls"); //MailMessage mail = new MailMessage(); //mail.Attachments = ma; //mail.Body = "你好"; //mail.AddRecipients("aa@qq.com"); //mail.From = "aa@qq.com"; //mail.FromName = "zkp"; //mail.Subject = "hello ni"; //SmtpClient sp = new SmtpClient(); //sp.SmtpServer = "smtp.qq.com"; //sp.Send(mail, "aa@qq.com", "aaa"); YZMHelper y = new YZMHelper(); y.CreateImage(); Bitmap b = y.Image; //Panel1.BackImageUrl = b; //ImageMap1. //Response.Write(b); } }}
888
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。