`
hvt
  • 浏览: 28102 次
社区版块
存档分类
最新评论

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

    博客分类:
  • .NET
阅读更多

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下载。

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

 

 

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

 

2
3
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics