国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > .NET > 正文

Asp.NET 生成靜態(tài)頁面并分頁的代碼

2024-07-10 12:42:31
字體:
來源:轉載
供稿:網友
1、靜態(tài)模板頁面 template.html,主要是定義了一些特殊字符,用來被替換。
代碼如下:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>Title </title>
</head>
<body>
<div style="width: 417px; height: 54px" align="center">
<br />
Title </div>
<div style="width: 417px; height: 8px">
瀏覽 <font color="red"> <script src="http://localhost/.Net/NewsFiles/ClickCount.aspx?NewsId=NewsId"> </script> </font>次 Time </div>
<div style="width: 417px; height: 100px">
Content </div>
<div style="width: 416px; height: 9px">
Pager </div>
<div style="width: 416px; height: 8px">
<form id="form1" action="../AddComment.aspx" style="margin:0px">
<input id="Text1" type="text" /> <Img id="Image1" src="http://www.dwww.cn/UserInfo/CheckCode.aspx"/> <br />
<textarea id="CommentContent" cols="20" rows="2"> </textarea>
<br />
<input id="NewsId" type="hidden" value="NewsId"/>
<input id="Button1" type="submit" value="button" />
<a >查看更多評論 </a> </form>
</div>
</body>
</html>

2、前態(tài)頁面 NewsAdd.aspx,就是一個表單,用來填寫新聞的標題和內容。
代碼如下:
<%@ Page Language="C#" AutoEventWireup="false" validateRequest="false" CodeFile="NewsAdd.aspx.cs" Inherits="NewsAdd.Admin_AdminPanel_NewsAdd" %>
<%@ Register TagPrefix="FCKeditorV2" Namespace="FredCK.FCKeditorV2" Assembly="FredCK.FCKeditorV2" %>
<!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 runat="server">
<title>添加新聞 </title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Label2" runat="server" Text="標題"> </asp:Label>
<asp:TextBox ID="Title" runat="server" Width="325px"> </asp:TextBox> <br />
<asp:Label ID="Label1" runat="server" Text="內容"> </asp:Label>
<FCKeditorV2:FCKeditor id="Content" basePath="~/FCKeditor/" runat="server" Height="400px" Width="70%"> </FCKeditorV2:FCKeditor>
<asp:Button ID="Button1" runat="server" onClick="Button1_Click" Text="Button" />
<asp:Label ID="Message" runat="server" > </asp:Label> </div>
</form>
</body>
</html>

3、后臺頁面 NewsAdd.aspx.cs
代碼如下:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 科技| 津南区| 桦南县| 紫阳县| 孝义市| 闻喜县| 皮山县| 武冈市| 云和县| 尼勒克县| 方山县| 岳普湖县| 桃源县| 八宿县| 四川省| 怀远县| 奉节县| 襄樊市| 芦溪县| 文成县| 马龙县| 琼海市| 永嘉县| 德江县| 太和县| 勐海县| 罗城| 怀化市| 射阳县| 綦江县| 彭山县| 潜江市| 汕头市| 巨野县| 宾阳县| 纳雍县| 延寿县| 贵阳市| 确山县| 长顺县| 洛扎县|