1、页面 <挢旗扦渌;div class="cont"> <span class="label">操作手册</span> <a href="/home/path" class="btn">下载</a> </div>
2、HomeController引用dll public ActionResult ViewManual() { try {
3、 string virtualURL = Configuratio艘绒庳焰nManager.AppSettings["ManualPath"].ToString(); string physicalPath = Server.MapPath(Server.UrlDecode(virtualURL)); if (string.IsNullOrEmpty(virtualURL) || !System.IO.File.Exists(physicalPath)) {
4、 string extension = Path.GetExtension(physicalPath); string htmlUrl = ""; switch (extension.ToLower()) {
5、 case ".doc": case ".docx": htmlUrl = PreviewWord(physicalPath, virtualURL); break; }