打印事件怎么写啊!!!
请问C#下的.net fromwork 怎么写打印事件啊!!!急用啊!!! --------------------编程问答-------------------- 打印事件?双击按钮就是1个事件
然后里面写
Response.ClearContent();--------------------编程问答-------------------- 我也想问一下 就是我有BUTTON按钮 点击之后弹出打印文本框内容就行 --------------------编程问答-------------------- http://msdn.microsoft.com/zh-cn/library/aa287530(v=VS.71).aspx --------------------编程问答-------------------- 客户端的实现打印的事件就好
Response.Buffer = true;
Response.Charset = "GB2312";
Response.AppendHeader("Content-Disposition", "attachment;filename=FileName1.xls");
//Response.AppendHeader("Content-Disposition", "attachment;filename=FileName1.doc");
Response.ContentEncoding = System.Text.Encoding.UTF7;
Response.ContentType = "application/excel";//设置输出文件类型为excel文件。
//Response.ContentType = "application/word";//设置输出文件类型为word文件。
//导出gridview部分
System.IO.StringWriter oStringWriter = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter oHtmlTextWriter = new System.Web.UI.HtmlTextWriter(oStringWriter);
gridview.RenderControl(oHtmlTextWriter);
Response.Write(oStringWriter.ToString());
Response.Flush();
Response.End();
IE直接调用浏览器的打印 --------------------编程问答-------------------- 我写了一个窗体!有一个打印按钮!在这个按钮的单击事件中写这就行了吗?
Response.ClearContent();
Response.Buffer = true;
Response.Charset = "GB2312";
Response.AppendHeader("Content-Disposition", "attachment;filename=FileName1.xls");
//Response.AppendHeader("Content-Disposition", "attachment;filename=FileName1.doc");
Response.ContentEncoding = System.Text.Encoding.UTF7;
Response.ContentType = "application/excel";//设置输出文件类型为excel文件。
//Response.ContentType = "application/word";//设置输出文件类型为word文件。
//导出gridview部分
System.IO.StringWriter oStringWriter = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter oHtmlTextWriter = new System.Web.UI.HtmlTextWriter(oStringWriter);
gridview.RenderControl(oHtmlTextWriter);
Response.Write(oStringWriter.ToString());
Response.Flush();
Response.End();
--------------------编程问答-------------------- 是不是打印的整个窗体的内容啊?有没有次序!是排版好的吗? --------------------编程问答-------------------- --------------------编程问答-------------------- 研究过,打印文本里的内容,打印数据控件里的内容,自己画其它内容。源码不在身边……
补充:.NET技术 , .NET Framework