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

首頁 > 開發 > 綜合 > 正文

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

2024-07-21 02:20:21
字體:
來源:轉載
供稿:網友
查看留言內容showtopic.aspx
<%@ 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;

    /// <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);
        }

        protected void page_load(object sender, eventargs e)
        {
            if (!ispostback)
            {
                //
                // evals true first time browser hits the page
                //
            }
        }

        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();
        }

        /// <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);
        }
    }
}


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 陇南市| 高雄市| 青岛市| 驻马店市| 沙坪坝区| 瑞昌市| 南华县| 墨玉县| 蒲江县| 宁武县| 广水市| 都安| 白沙| 万宁市| 资兴市| 工布江达县| 平泉县| 临夏市| 信阳市| 浦江县| 元江| 博白县| 尚义县| 鄄城县| 中卫市| 军事| 祁东县| 龙井市| 南宁市| 前郭尔| 响水县| 济源市| 莱芜市| 金门县| 霍邱县| 北辰区| 呼和浩特市| 得荣县| 涿州市| 垦利县| 青川县|