码迷,mamicode.com
首页 > Windows程序 > 详细

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

时间:2015-02-03 22:55:59      阅读:235      评论:0      收藏:0      [点我收藏+]

标签:

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

是后台管理的首页。

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


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

bool CreateHtmlFile(string url, string path)
{ 
//http://keleyi.com/a/bjae/3d10wfax.htm

string m_content = Utils.GetHtmlByUrl(Utils.GetAbsolutePath() + url, Encoding.UTF8);
if (m_content == string.Empty)
{
return false;
}

Utils.CreateFile(m_content, Utils.GetMapPath(path), Encoding.UTF8);
return true;
}

 


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

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

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

 

http://www.cnblogs.com/sosoft/p/kaifajishu.html

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

标签:

原文地址:http://www.cnblogs.com/sosoft/p/4271213.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!