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

首頁 > 開發 > 綜合 > 正文

利用c#制作簡單的留言板(3)

2024-07-21 02:17:54
字體:
來源:轉載
供稿:網友

顯示列表list.aspx
<%@ page language="c#" codebehind="list.cs" autoeventwireup="false" inherits="notpage.list" %>
<html><head>
<meta name="generator" content="microsoft visual studio 7.0">
<meta name="code_language" content="c#"></head>
<body>

<form method="post" runat="server"></p><p> </form><a href = "addtopic.aspx">發表留言</a><br>
<table width="90%" height="1" border="0" cellspacing="2" cellpadding="2" id=liuyan>
<tr>
<td>主題</td>
<td>留言人</td>
<td>留言時間</td>
</tr>

<asp:label id="n_tdtitle" runat=server></asp:label>

</table></p><p> </body></html>
namespace notpage
{
using system;
using system.collections;
using system.componentmodel;
using system.data;
using system.drawing;
using system.web;
using system.web.sessionstate;
using system.web.ui;
using system.web.ui.webcontrols;
using system.web.ui.htmlcontrols;</p><p> </p><p>
/// <summary>
/// summary description for list.
/// </summary>
public class list : system.web.ui.page
{
protected system.web.ui.webcontrols.label n_tdtitle;

public list()
{
page.init += new system.eventhandler(page_init);
}</p><p> protected void page_load(object sender, eventargs e)
{
if (!ispostback)
{
//
// evals true first time browser hits the page
//
}
}</p><p> protected void page_init(object sender, eventargs e)
{
//
// codegen: this call is required by the asp+ windows form designer.
//
initializecomponent();
init_tdtitle();
</p><p> }
</p><p> /// <summary>
/// required method for designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void initializecomponent()
{
this.load += new system.eventhandler (this.page_load);
}

protected void init_tdtitle()
{
initializecomponent();
//
// codegen: this call is required by the asp+ windows form designer.
//
try

notepage np = new notepage();</p><p> arraylist arrtopic = np.gettopiclist();

for ( int i = 0 ; i < arrtopic.count ; i ++)

notepage objtopic = (notepage)arrtopic[i] ;
string str ="<tr><td><a href = showtopic.aspx?id="+objtopic.id.tostring()+">" + objtopic.title.tostring() + "</a></td>";
str = str +"<td>" + objtopic.author.tostring()+"</td>";
str = str +"<td>" + objtopic.adddate.tostring()+"</td></tr>";
n_tdtitle.text = str + n_tdtitle.text;
}
}
catch(exception e)
{
throw(new exception("取得貼子列表出錯:" + e.tostring())) ;
}</p><p> }
}
}
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 花垣县| 平潭县| 淳化县| 河北区| 全州县| 临汾市| 成都市| 阜阳市| 内丘县| 静安区| 双鸭山市| 怀仁县| 武川县| 天镇县| 三河市| 桓仁| 紫云| 张家川| 云阳县| 泉州市| 通化县| 河间市| 马龙县| 普格县| 连城县| 文山县| 新和县| 永泰县| 上蔡县| 壶关县| 手游| 谢通门县| 二连浩特市| 务川| 甘德县| 贡觉县| 临江市| 汤阴县| 文安县| 德化县| 汕头市|