上一篇:C#连接ACCESS和SQL2000 >>
利用c#制作简单的留言板(4)
<%@ Page language="c#" Codebehind="showTopic.cs" AutoEventWireup="false" Inherits="notpage.showTopic" %>
<html><head>
<meta content="Microsoft Visual Studio 7.0" name=GENERATOR>
<meta content=C# name=CODE_LANGUAGE></head>
<body>
<form method=post runat="server">
<p align=center><font color=red><b>察看留言</b></font></p><br>
<p align=left><font color=blue>留言主题:<asp:label id=n_tdtitle runat="Server" forecolor="Black"></asp:label>
<br>留言时间:<asp:label id=n_tdAdddate runat="Server" forecolor="Black"></asp:label><br></font><font color=blue>留言人:
<asp:label
id=n_tdAuthor runat="server" forecolor="Black"></asp:label><br>留言内容:<asp:label id=n_tdContent
runat="Server" forecolor="Black"></asp:label> </font></p></form>
</body></html>
对应的cs
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> /// <summary>
/// Summary description for showTopic.
/// </summary>
public class showTopic : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Label n_tdAuthor;
protected System.Web.UI.WebControls.Label td;
protected System.Web.UI.WebControls.Label n_tdContent;
protected System.Web.UI.WebControls.Label n_tdAdddate;
protected System.Web.UI.WebControls.Label n_tdtitle;
protected System.Web.UI.WebControls.Label n_ttitle;
public showTopic()
{
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.
//
int int_ID;
int_ID = Request.QueryString["ID"].ToInt32();
notepage np = new notepage();
notepage objNp = np.GetTopic(int_ID);
n_tdtitle.Text = objNp.Title.ToString();
n_tdContent.Text = objNp.Content.ToString();
n_tdAuthor.Text = objNp.Author.ToString();
n_tdAdddate.Text = objNp.adddate.ToString();
InitializeComponent();
}</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);
}
}
}
下一篇:利用c#制作简单的留言板(3) >>
相关文章:
- · C#调用ORACLE存储过程返回结果集及函数
- · C#实现的根据年月日计算星期几的函数
- · 汇总c#.net常用函数和方法集
- · 不要忽略c#中的using和as操作符
- · C#中关于GDI+输出的问题
- · 几个C# PROGRAMS
- · 几个C# PROGRAMS (2)
- · c#中的interface abstract与virtual
- · MapX从数据库读取数据形成新图层(C#)
- · C#对XML操作:建立XML(2)
- · C#对XML操作:建立XML(1)
- · C#调用父类的父类的方法
- · .NET中C#实现C/S架构下的TREEVIEW只需要输入表名,父ID,节点ID,节点名就可以得到树型结构
- · what is new in c sharp 2.0--study from msdn
- · C#设计模式之建造者(Builder)模式示例源代码
- · UBB(c#完整版)
- · c#中结构与类的区别
- · 三层结构
- · Destructors in C#
- · 链表类具有哈希表的功能
- · C#中委托,事件理解入门
- · Introduce event delegate
- · 替换以|分割的相同字符串
- · IOCP Thread Pooling in C#
- · C# struct class Differences
- · C#冒泡算法!
- · C#写的数据库操作类!
- · 快速开发vs.net+c#程序(-)
- · C#对XML操作:编辑XML文件内容
- · 用C#生成Excel文件的方法和Excel.dll组件生成的方法
- · 用C#实现Web文件的上传
- · C#编写的生成缩略图程序
- · 用一个留言簿说明C#操作XML的完全过程
- · 递归枚举排列、组合的C#源码
- · C#反编译微软MSDN2003的帮助文档,并将反编译结果保存到一个SQLSERVER数据库中
- · 用C#轻松在DOTNET中实现缩略图
- · c#中结构与类的区别
- · DES加密算法在C#下的实现
