网站公告列表

  没有公告

加入收藏
设为首页
联系站长
您现在的位置: 博瑞软件 >> 技术文章 >> 网络编程 >> asp >> 文章正文
  一段显示论坛贴子的程序           ★★★ 【字体:
一段显示论坛贴子的程序
作者:佚名    文章来源:网上收集    点击数:    更新时间:2008-6-23    
一段显示论坛贴子的程序
///////////////////////////////////////////////////////////////////////////////
//
// File name:         showtopic.cs
//
// Description:       showtopic.ASPx的后台代码
//
// date:              2000/11/01
//
// Programming:       Bigeagle
//
// History:           version 1.0
//                    start at 2000/11/01 11:00  finish at
//
////////////////////////////////////////////////////////////////////////////////

using BBS ;                           //my own namespace
using System;
using System.Data;
using System.Data.SQL;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HTMLControls;
using System.Drawing ;
using System.Web.Security ;
using System.Collections ;
using System.Text.RegularExpressions ;


public class ShowTopic : Page
{

    public int ForumID ;
    public int ID ;

    public Label lblForumName ;              //板块名称
    public HyperLink linkMaster ;            //斑竹连接
    public Label lblTopicCounts ;            //论坛贴子数
    public HTMLImage imgNew1 ;               //是否新贴子图片
    public HTMLImage imgOICQ ;               //oicq图片
    public HyperLink linkForumName ;         //板块名称
    public HyperLink linkPrev ;              //上一主题
    public HyperLink linkPrev1 ;              //上一主题
    public HyperLink linkNext ;              //下一主题
    public HyperLink linkNext1 ;              //下一主题
    public Panel panReply ;                   //回复

    //本贴
    public HyperLink linkAuthor ;            //作者
    public Label lblTitle ;                  //主题
    public Label lblPostTime ;               //发表时间
    public Label lblHits ;      &nb

[1] 。sp;            //本贴点击数
    public HTMLGenericControl  divSignature ;     //用户签名
    public HTMLGenericControl  divContent ;     //内容
    public HTMLImage imgFace ;               //表情图片
  
    public void Page_Load(object sender , EventArgs e)
    {
        int m_intID = 0;
        //取页面参数
        try
        {
            m_intID = Request.QueryString["id"].ToInt32() ;
            ID = m_intID ;
        }
        catch(Exception exp)
        {
            Response.Write("[ln48]:" + exp.ToString());
         
        }     
        finally
        {
     
            Dictionary objUserList = (Dictionary)Application["User"] ;    //用户列表
     
            //取贴子
            SQLConnection myConnection = new SQLConnection("server=server1;uid=sa;pwd=;database=BBS");
            SQLCommand myCommand = new SQLCommand("up_GetTopics" , myConnection);

            myCommand.ActiveConnection = myConnection ;
            myCommand.CommandType = CommandType.StoredProcedure;
      
            SQLParameter workParam = null;

            //贴子id
            workParam = myCommand.Parameters.Add(new SQLParameter("@a_intID", SQLDataType.Int, 4));
            workParam.Direction = ParameterDirection.Input;
            workParam.Value = m_intID ;
        
            SQLDataReader myReader ;
          
            try
            {
                myConnection.Open();
                myCommand.Ex

。ecute(out myReader);
         

文章录入:admin    责任编辑:admin 
  • 上一篇文章:

  • 下一篇文章:
  • 发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    最新热点 最新推荐 相关文章
    没有相关文章
      网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
    Copyright©2001-2008 北京博瑞迅通软件技术研究所 版权所有
    京ICP备06052525号