DBMNG数据库管理与应用

科学是实事求是的学问,来不得半点虚假。
当前位置:首页 > 经验分享 > WEB

C#根据网址生成静态页面

HoverTree开源项目中HoverTreeWeb.HVTPanel的Index.aspx文件

是后台管理的首页。

包含生成留言板首页,以及显示用户名,退出等功能。


根据网址生成页面的方法:

 

C#代码  
  1. bool CreateHtmlFile(string url, string path)  
  2. {   
  3. //http://keleyi.com/a/bjae/3d10wfax.htm  
  4.   
  5. string m_content = Utils.GetHtmlByUrl(Utils.GetAbsolutePath() + url, Encoding.UTF8);  
  6. if (m_content == string.Empty)  
  7. {  
  8. return false;  
  9. }  
  10.   
  11. Utils.CreateFile(m_content, Utils.GetMapPath(path), Encoding.UTF8);  
  12. return true;  
  13. }  

 

 

 

具体可以到 http://hovertree.codeplex.com下载源代码。

最新开发版本请打开http://hovertree.codeplex.com/SourceControl/latest#readme.txt
然后点击Clone右边的Download下载。

生成静态页面的好处:
静态网站最大优势是访问速率非常快,对搜索引擎收录支持非常友好,节约网站服务器的资源。

 

ASP.NET开源项目HoverTree资源:http://hvt.iteye.com/blog/2182470

本站文章内容,部分来自于互联网,若侵犯了您的权益,请致邮件chuanghui423#sohu.com(请将#换为@)联系,我们会尽快核实后删除。
Copyright © 2006-2023 DBMNG.COM All Rights Reserved. Powered by DEVSOARTECH            豫ICP备11002312号-2

豫公网安备 41010502002439号