asp.net2.0自动根据用户自定义字数生成带分页的静态(HTML)页
2008-04-29 09:59
726 查看
闲来无事,其他的人都在忙着迎新生,正好要用到生成静态页的东西,于是开始搜索,但是一直没有找到我自己想要的合适的东西,比如我要有自己的文件夹,可以根据自己的需要放进去,我要生成按年/月/日分开的静态页完整的RL举个例子来说就是:
http://www.***.com/news/sport/20070908/1_1.html
其中呢像news/sport/20070908 都是动态生成的!并且要求生成出来的静态页要能够自己分页!
有了这个需求,下面大概介绍一下我的思路,首先就是你的服务器要有fso权限,那么你就可以生成文件夹了!生成的文件夹呢就是你存放html文件的path,那么我们还需要定义html文件的名称如1_1.html,其中第一个1是新闻的id,第二个1呢就是页码,生成静态页的思想呢用到的就是标签替换的思想!当然我这里没有实现按照时间段批量生成,不过考虑到这才是第一个版本,以后还会陆续添加,来看看图片吧!
private void creatHTML()
private string checkFile()
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>
<title>$title</title>
<link rel="stylesheet" rev="stylesheet" href="../CSS/Main.css" type="text/css" />
</head>
<body>
<div style="margin:0px auto; text-align:center; padding:2px;width:80%; border:1px solid #d7d7d7;">
<div style=" text-align:center; float:left; width:100%; margin:0px 0px 10px 0px;">
<span class="fs13 isbold cblack">$title</span>
<br />
<hr style="text-align:center; size:1px;" />
</div>
<div style=" text-align:left; float:left; width:100%; margin:0px 0px 10px 0px;">
<span class="fs12" style="line-height:20px;">$content</span>
</div>
<div style=" margin:0px auto; text-align:center; width:98%; border:1px solid #d7d7d7; background-color:#ececec; height:20px;">
<span class="fs12">$page</span>
</div>
</div>
</body>
</html>
想要的留个邮箱吧!
希望高手帮我指正!
http://www.***.com/news/sport/20070908/1_1.html
其中呢像news/sport/20070908 都是动态生成的!并且要求生成出来的静态页要能够自己分页!
有了这个需求,下面大概介绍一下我的思路,首先就是你的服务器要有fso权限,那么你就可以生成文件夹了!生成的文件夹呢就是你存放html文件的path,那么我们还需要定义html文件的名称如1_1.html,其中第一个1是新闻的id,第二个1呢就是页码,生成静态页的思想呢用到的就是标签替换的思想!当然我这里没有实现按照时间段批量生成,不过考虑到这才是第一个版本,以后还会陆续添加,来看看图片吧!
private void creatHTML()
private string checkFile()
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>
<title>$title</title>
<link rel="stylesheet" rev="stylesheet" href="../CSS/Main.css" type="text/css" />
</head>
<body>
<div style="margin:0px auto; text-align:center; padding:2px;width:80%; border:1px solid #d7d7d7;">
<div style=" text-align:center; float:left; width:100%; margin:0px 0px 10px 0px;">
<span class="fs13 isbold cblack">$title</span>
<br />
<hr style="text-align:center; size:1px;" />
</div>
<div style=" text-align:left; float:left; width:100%; margin:0px 0px 10px 0px;">
<span class="fs12" style="line-height:20px;">$content</span>
</div>
<div style=" margin:0px auto; text-align:center; width:98%; border:1px solid #d7d7d7; background-color:#ececec; height:20px;">
<span class="fs12">$page</span>
</div>
</div>
</body>
</html>
想要的留个邮箱吧!
希望高手帮我指正!
相关文章推荐
- asp.net2.0自动根据用户自定义字数生成带分页的静态(HTML)页
- asp.net2.0自动根据用户自定义字数生成带分页的静态(HTML)页 v1.5 beta
- asp.net2.0自动根据用户自定义字数生成带分页的静态(HTML)页
- asp.net中将DataTable根据xslt生成html静态页面,支持分页
- VScode中自定义用户代码片段(C user snippet)自动生成C语言头文件排除重复包含
- 根据用户输入的二代身份证号码自动为其计算生成出生日期的javascript方法
- 关于HTML静态页面(含自动分页)生成的可行性方案
- php自定义方法:自动生成数据表格(支持分页)
- DEDECMS首页自动生成静态文件index.html
- Html 分页自动控制、分页自动生成、分页数量可控制
- php生成静态html分页实现方法
- ASP 根据模板生成HTML静态文件类
- [项目过程中所遇到的各种问题记录]编辑器篇——使用FCKeditor生成静态分页HTML
- 根据Android Layout XM文件自动生成自定义View代码的工具类
- php生成静态html分页实现方法
- 自动把动态的jsp页面(或静态html)生成PDF文档,并且上传至服务器
- 根据表或者视图自动生成分页语句的存储过程,适用于Sql Server 2005及以上版本
- php生成静态html分页实现方法
- 生成html静态文件后的分页(客户端版)
- ASP.NET自动生成静态HTML网页, 再按日期存放目录