MVC如何在html页面显示word文档

 时间:2024-10-11 20:30:33

1、页面 <挢旗扦渌;div class="cont"> <span class="label">操作手册</span> <a href="/home/path" class="btn">下载</a> </div>

MVC如何在html页面显示word文档

2、HomeController引用dll public ActionResult ViewManual() { try {

MVC如何在html页面显示word文档

3、 string virtualURL = ConfigurationManager.AppSettings["ManualPath"].ToString(); string physicalPath = Server.MapPath(Server.UrlDecode(virtualURL)); if (string.IsNullOrEmpty(virtualURL) || !System.IO.File.Exists(physicalPath)) {

MVC如何在html页面显示word文档

4、 string extension = Path.GetExtension(physicalPath); string htmlUrl = ""; switch (extension.ToLower()) {

MVC如何在html页面显示word文档

5、 case ".doc": case ".docx": htmlUrl = PreviewWord(physicalPath, virtualURL); break; }

MVC如何在html页面显示word文档
  • 君子兰养护方法
  • 如何购买毛绒玩具
  • HALT如何停止机器运行
  • 命运战歌技能书怎么获得
  • 热门搜索
    旅游分享 那曲旅游 旅游人 出游客旅游网 青芒果旅游网 中俄边境旅游 中国旅游报电子版 短期旅游保险 西双版纳旅游线路 阿尔卑斯山旅游