摘要: 因为最近上班做邮箱附件的预览功能,上网找到的解决方案是转为html文件,自己总结了一下:1.先添加office组建,右键网站,点击添加引用2.选择.NET找到你需要的组件,例如Microsoft.Office.Interop.Excel(版本为12.0.0.0),我这里用的还有ppt,word,三个都添加上3.开始写代码View Code 1usingSystem;2usingSystem.Collections.Generic;3usingSystem.Linq;4usingSystem.Web;5usingSystem.Web.UI;6usingSystem.Web.UI.WebContr 阅读全文
posted @ 2011-04-21 14:28 Java&&C#学习 阅读(1569) 评论(0) 推荐(1) 编辑
摘要: 用到的是HttpUtility.UrlEncode,转换html编码的字符串并将输出作为System.IO.Textwriter流输出Response.Redirect("WordShow.aspx?word="+HttpUtility.UrlEncode("所要传的参数");接收的时候就是解码了stringparm=HttpUtility.UrlDecode(Request.QueryString["no"]); 阅读全文
posted @ 2011-04-21 13:39 Java&&C#学习 阅读(364) 评论(0) 推荐(0) 编辑