用代码生成的word文档,
可是打开是web板式。
怎么才能用代码设置为页面视图呢。
可是打开是web板式。
怎么才能用代码设置为页面视图呢。
解决方案 »
- 怎样用GZipStream压缩大文件?
- treeView数据问题
- C# Winform RichTextBox双击选中文本忽略特殊符号,像记事本一样该如果做?
- 【求思路】如何将数据库中的表插入到另一张表中
- 如何用正则表达式取一个串"contact.asp?whoid=308102 target"中的子串"308102"。如
- c#调用存储过程 有datetime类型参数,如果想传入null型
- 请问在C#中怎样将ProgressBar设置成3D的?
- 较难的c#问题,辅助线程怎么访问session?
- 如何使已绑定datagrid得值,恢复原始值
- 我如何能把.txt的文档打开时就运行我写的记事本程序中运行..而不是用系统自带的
- 另类装饰你的Winform - 在窗口的左上角加一个圣诞帽
- process执行exe进行ftp传输的问题
string fileName = "";//客户端保存的文件名
string filePath = Server.MapPath("");//路径 FileInfo fileInfo = new FileInfo(filePath);
Response.Clear();
Response.ClearContent();
Response.ClearHeaders();
Response.AddHeader("Content-Disposition", "attachment;filename=" + fileName);
Response.AddHeader("Content-Length", fileInfo.Length.ToString());
Response.AddHeader("Content-Transfer-Encoding", "binary");
Response.ContentType = "application/octet-stream";
Response.ContentEncoding = System.Text.Encoding.GetEncoding("gb2312");
Response.WriteFile(fileInfo.FullName);
Response.Flush();
Response.End();