惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 【当耐特】
Help Net Security
Help Net Security
P
Proofpoint News Feed
J
Java Code Geeks
爱范儿
爱范儿
Last Week in AI
Last Week in AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
F
Full Disclosure
Google DeepMind News
Google DeepMind News
H
Help Net Security
G
Google Developers Blog
Jina AI
Jina AI
Vercel News
Vercel News
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
L
Lohrmann on Cybersecurity
S
Schneier on Security
Microsoft Azure Blog
Microsoft Azure Blog
IT之家
IT之家
Security Archives - TechRepublic
Security Archives - TechRepublic
阮一峰的网络日志
阮一峰的网络日志
N
News and Events Feed by Topic
GbyAI
GbyAI
B
Blog
O
OpenAI News
博客园_首页
Cisco Talos Blog
Cisco Talos Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Hacker News: Ask HN
Hacker News: Ask HN
TaoSecurity Blog
TaoSecurity Blog
腾讯CDC
MongoDB | Blog
MongoDB | Blog
M
MIT News - Artificial intelligence
C
Cybersecurity and Infrastructure Security Agency CISA
Cyberwarzone
Cyberwarzone
Webroot Blog
Webroot Blog
Simon Willison's Weblog
Simon Willison's Weblog
Y
Y Combinator Blog
C
Cisco Blogs
A
Arctic Wolf
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
T
The Exploit Database - CXSecurity.com
Security Latest
Security Latest
AI
AI
W
WeLiveSecurity
aimingoo的专栏
aimingoo的专栏
The Register - Security
The Register - Security
Project Zero
Project Zero
H
Hackread – Cybersecurity News, Data Breaches, AI and More
N
Netflix TechBlog - Medium
Blog — PlanetScale
Blog — PlanetScale

博客园 - 墨墨

Windows Phone 7中配置gmail, 使用outlook 同步邮件,日历,联系人等 iPhone 闭包应用 iPhone屏幕旋转的例子 objective-c的TextFields输入完成后关闭键盘和触摸背景关闭键盘 第一个iPhone程序之Hello World 第一个objective-c程序 iPhone自动化测试 visual studio 2010 ultimate 下载 suse下设置IP的两种方法 freebsd下之简单安装python ibatis.net私人学习资料,勿下(加密) ibatisnet高级查询 Python相关中文学习资料 搭建python的web开发环境 windows下 使用Aptana搭建Python开发环境 使用SharpZipLib 解压zip 2012年真的是世界末日吗?_全球关注 Json格式类的转换相关代码 Extjs 登录界面源码
关于生成静态页--终极解决方案
墨墨 · 2009-07-27 · via 博客园 - 墨墨

先生成html到服务器硬盘上,然后根据WebClient这个类去download那个html文件,下面那个Replace不是替换成html,这边是设置后缀,不是很了解的可以参照微软的msdn看一下webclient类。
这是真正的静态页
原理很简单

 1     public class SetRemoteURL
 2     {
 3         static string str2HTML = string.Empty;
 4         public SetRemoteURL() { }
 5         /// <summary>
 6         /// to THML
 7         /// </summary>
 8         /// <param name="strWebFromName">要转换的aspx文件,带后缀</param>
 9         public static void Convert(string strWebFormName)
10         {
11             str2HTML = str2HTML.ToLower();
12             str2HTML = strWebFormName.Replace(".aspx"".html");
13 
14             string strURL = "http://" + HttpContext.Current.Request.Url.Authority + "/" + strWebFormName;
15             new System.Net.WebClient().DownloadFile(strURL, System.Web.HttpContext.Current.Server.MapPath("~/" + str2HTML));
16             HttpContext.Current.Response.Redirect(str2HTML);
17         }
18     }