当前位置:编程学习 > C#/ASP.NET >>

C#生成静态两方法

一、模板文件

template.html

<!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>
    <title> $title$ 生成静态页的Demo</title>
    <style type="text/css">
<!--
.STYLE1 {
    font-size: 16px;
    font-weight: bold;
}
-->
    </style>
</head>
<body>
<br />
<br />
<table width="100%" border="0" bgcolor="#339900">
  <tr>
    <td height="34" align="center" bgcolor="#FFFFFF"><span class="STYLE1">$title$ </span></td>
  </tr>
  <tr>
    <td height="42" bgcolor="#FFFFFF"><br />
      <br />
    内容:$content$ </td>
  </tr>
</table>

</body>
</html>

后台代码

using System;
using System.IO;
using System.Text;


public partial class _Default : System.Web.UI.Page 
{
        protected 
补充:软件开发 , C# ,
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,