知识在于积累(.NET之路……)

导航

2010年10月25日 #

C#直接打开文件

摘要: Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->string filePath = @"/Dir/aa.txt"; //相对路径System.Diagnostics.Process.Start(Server.MapPath(filePath)); 阅读全文

posted @ 2010-10-25 11:43 汤尼 阅读(371) 评论(0) 推荐(0) 编辑

C#之文件下载

摘要: Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->string path="/Dir/01.txt"; //文件相对路径string Files = Server.MapPath(path); if (File.Exists(Files)) { try { System.IO.FileInfo DownloadFile = new System.IO.FileInfo(Files); string fileName = Do 阅读全文

posted @ 2010-10-25 11:08 汤尼 阅读(151) 评论(0) 推荐(0) 编辑

C#获取当前页面的URL地址

摘要: Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#region 获取页面地址 /// <summary> /// 获取页面地址 /// </summary> /// <returns></returns> public static string GetUrl() { string strTemp = "http://"; if (System.Web.HttpContext 阅读全文

posted @ 2010-10-25 11:05 汤尼 阅读(908) 评论(1) 推荐(0) 编辑