View message Content Showtopic.aspx
<%@ page language= "C #" codebehind= "ShowTopic.cs" autoeventwireup= "false" inherits= "Notpage.showtopic"%>
<meta content= "Microsoft Visual Studio 7.0" name=generator>
<meta content=c# name=code_language><body>
<form method=post runat= "Server" >
<p align=center><font color=red><b> View message </b></font></p><br>
<p align=left><font color=blue> Message topic: <asp:label id=n_tdtitle runat= "Server" forecolor= "Black" >< /asp:label>
<br> message time: <asp:label id=n_tdadddate runat= "Server" forecolor= "Black" ></asp:label><br></ Font><font color=blue> Message Person:
<asp:label
Id=n_tdauthor runat= "Server" forecolor= "Black" ></asp:label><br> message content: <asp:label id=n_tdcontent
runat= "Server" forecolor= "Black" ></asp:label> </font></p></form>
</body>The corresponding 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 was 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);
}
}
}
The above is the use of C # to make a simple message board (4) of the content, more relevant articles please pay attention to topic.alibabacloud.com (www.php.cn)!