您的位置:首页 > 编程语言 > ASP

asp.net 生成html 简单示例

2007-05-15 01:12 519 查看
模板文件内容:
mb.html

<html>
<head>
<title>Create Html</title>
</head>
<body>
<form id="form1">
<div>
<table>
<tr>
<td>
<br><br>
title:$title$
<br><br>
content:$content$
<br><br>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>

代码:

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Text;
using System.IO;

public partial class _Default : System.Web.UI.Page

生成后的文件内容:
20070515010734.shtml

<html>
<head>
<title>Create Html</title>
</head>
<body>
<form id="form1">
<div>
<table>
<tr>
<td>
<br><br>
title:mytitle
<br><br>
content:myContent
<br><br>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: