asp.net生成静态页面
ASP.NET生成静态页
核心技术:
HTMLPage文件夹,ModelHTML.htm文件中的ArticleTitle,ArticleContent都是要替换的区域
WriteFile(dr["ArticleTitle"].ToString(), dr["ArticleContent"].ToString(), dr["ID"].ToString());
1.前台
<head runat="server">
<title>ASP.NET生成静态网页</title>
</head>
<body style="text-align: center" mce_style="text-align: center">
<form id="form1" runat="server">
<div style="text-align: center" mce_style="text-align: center">
<table style="width: 601px" cellpadding="0" cellspacing="0">
<tr>
<td colspan="3" style="height: 85px; text-align: center;"><strong>ASP.NET生成静态网页</strong></td>
</tr>
<tr>
<td colspan="3" rowspan="2" style="vertical-align: top; height: 67px; text-align: center">
<asp:DataList ID="DataList1" runat="server" BackColor="White" BorderColor="#E7E7FF"
BorderStyle="None" BorderWidth="1px" CellPadding="3" GridLines="Horizontal" OnItemCommand="DataList1_ItemCommand">
<FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
<SelectedItemStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
<ItemTemplate>
<table cellpadding="0" cellspacing="0" style="font-size: 9pt; width: 563px">
<tr>
<td style="width: 30px; height: 17px">ID:</td>
<td style="width: 60px; height: 17px"><%#DataBinder.Eval(Container.DataItem,"ID") %></td>
<td style="width: 50px; height: 17px">主题:</td>
<td colspan="3" style="width: 354px; height: 17px; text-align
相关文档:
作为一个程序员,在完成设计后还要根据程序的情况以及用户的反映不断对程序进行改进,这样才能不断地完善自己的作品。笔者在制作完软件商务网的论坛后,发现人们总喜欢在帖子中加上各种有用的URL链接或Email地址。而笔者当初设计时没有考虑到这一点,使得这些URL链接或Email地址只能以文字的形式而并不是以超链接的形式显示 ......
1、DateTime 数字型
以下是引用片段:
System.DateTime currentTime=new System.DateTime();
1.1 取当前年月日时分秒 currentTime=System.DateTime.Now;
1.2 取当前年 int 年=currentTime.Year;
1.3 取当前月 int 月=currentTime.Month;
1.4 取当前日 int 日=currentTime.Day;
1.5 取当前时 int 时=currentTi ......
IIS自身是不能处理像ASPX扩展名这样的页面,只能直接请求像HTML这样的静态文件,之所以能处理ASPX这样扩展名的页面,是因为IIS有一个ISAPI过滤器,它是一个COM组件。ASP.NET服务在注册到IIS的时候,就会添加一个Win32的扩展动态库aspnet_isapi.dll。并将扩展可以处理的页面扩展名(如ASPX)注册到IIS里面。扩展启动后,就根 ......
The following is a simple checklist you can use when building web
applications. Much of this still applies to other technologies and can
easily be extended. I try not to get too specific on technology or
methodology, but it is definitely leaning toward ASP.NET.
If you
......