.net 生成HTML页
protected override void OnPreInit(EventArgs e)
{
base.OnPreInit(e);
string path = Server.MapPath("HomePage.htm");
if (File.Exists(path))
{
DateTime lastUpdatedTime = File.GetLastWriteTime(path);
if ((DateTime.Now - lastUpdatedTime) <= TimeSpan.fromHours(2))
{
using (StreamReader reader = new StreamReader(path, Encoding.UTF8))
{
string basic = reader.ReadToEnd();
Response.Write(basic);
Response.End();
}
}
}
&nb
相关文档:
HTML的界面有以下特点:图文混排,格式灵活,可以包含Flash、声音和视频等,实现图文声像的多媒体界面,而且易于建立和维护。另外,HTML的显示环境一般机器上都具备,通常不需要安装额外的软件。当然,HTML界面也有它欠缺的方面,即:界面控制能力有限,代码调试不便----虽然DHTML提供了比较强的编程特性,但是比起Delphi的 ......
function unhtml($content){
$content=htmlspecialchars($content);
$content=str_replace(chr(13),"<br>",$content);
$content=str_replace(chr(32)," ",$content);
return trim($content);
}
......
using System.Text.RegularExpressions;
string ohtml = this.TextBox1.Text;
System.Text.RegularExpressions.MatchCollection m;
//提取字符串的图片
......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=gb2312" http-equiv="Content-Type" />
<title>简单的测试页面</title> ......
作者
崔康
发布于
2010年5月13日 下午10时14分
随着Web2.0技术的不断发展,Web前端的优化受到越来越多的关注,特别是JavaScript和CSS优化的讨论一直是热点,工具也
相对丰富,而对HTML优化则有所忽视,最近,来自百度泛用户体 ......