首页 > 学院 > 开发设计 > 正文

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

2019-11-17 02:35:06
字体:
来源:转载
供稿:网友

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

HoverTree开源项目中HoverTreeWeb.HVTPanel的Index.aspx文件是后台管理的首页。包含生成留言板首页,以及显示用户名,退出等功能。根据网址生成页面的方法:

bool CreateHtmlFile(string url, string path){ //http://keleyi.com/a/bjae/3d10wfax.htmstring 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.VEVb.com/sosoft/p/kaifajishu.html


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表