• 大小: 1.99MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-09-09
  • 语言: C#
  • 标签: ASP.NET  C#  SQL  

资源简介

开发网上在线论坛最终目的是为用户提供一个良好的技术交流平台,得到用户的及时反馈。

资源截图

代码片段和文件信息

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
public partial class Default: System.Web.UI.Page
{
    protected void Page_Load(object sender EventArgs e)
    {
       
        if (!this.IsPostBack)
        {
            
            // 将系统时间与13进行比较,来获取问候语
            int Time = System.DateTime.Now.Hour.CompareTo(13);
            string str;
            if (Time > 0)
            {
                str = “下午好!“;
            }
            else if (Time < 0)
            {
                str = “上午好!“;
            }
            else
            {
                str = “中午好!“;
            }
            if (Session[“UserName“] == null && Session[“UserPwd“] == null)
            {
            }
            else
            {
                //this.Label6.Visible = true;
            
            
            }
            this.aa();
             this.Label6.Text = str;   
        } 
       
    }
    public void aa()
    {
        SqlConnection con = DB.createDB();
        SqlCommand cmd = new SqlCommand();
        cmd.Connection = con;
        con.Open();
        SqlDataAdapter sda = new SqlDataAdapter(“select * from tb_Content“ con);
        DataSet ds = new DataSet();
        sda.Fill(ds “tb_Content“);
        this.gvlt.DataSource = ds;
        this.gvlt.DataKeyNames = new string[] { “ContId“ };
        this.gvlt.DataBind();
        con.Close();
    }
    protected void gvlt_PageIndexChanging(object sender GridViewPageEventArgs e)
    {
        this.gvlt.PageIndex = e.NewPageIndex;
        this.aa();
    }
    protected void ImageButton1_Click(object sender ImageClickEventArgs e)
    {
        Response.Redirect(“~/teizixinxi/addteizi.aspx“);
    }
    protected void linkButton4_Click(object sender EventArgs e)
    {
        Response.Redirect(“~/denglu/denglu.aspx“);
    }
    protected void linkButton3_Click(object sender EventArgs e)
    {
        Response.Redirect(“~/dangqianxinxi/dqyhxinxixg.aspx“);
    }
    protected void linkButton2_Click(object sender EventArgs e)
    {
        Response.Redirect(“~/yonghuxinxi/yonghu.aspx“);
    }
    protected void linkButton5_Click(object sender EventArgs e)
    {
        Response.Redirect(“~/yonghuxinxi/yonghuchaxun.aspx“);
    } 
    protected void ImageButton2_Click(object sender ImageClickEventArgs e)
    {
        Response.Redirect(“~/teizixinxi/addteizi.aspx“);
    }
    protected void ImageButton1_Click1(object sender ImageClickEventArgs e)
    {
        SqlConnection con = DB.createDB();
        SqlCommand cmd = new SqlCommand();
        cmd.Connection = con;
        con.Open();
        cmd.CommandText = “select count(*) from tb_Users where UserName=‘“ + this

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-05-22 14:50  luntan\App_Code\
     文件         583  2011-02-15 15:38  luntan\App_Code\DB.cs
     目录           0  2018-05-22 14:50  luntan\App_Data\
     文件     3145728  2011-03-29 11:36  luntan\App_Data\db_Discuss.mdf
     文件     1048576  2011-03-29 11:36  luntan\App_Data\db_Discuss_log.ldf
     目录           0  2018-05-22 14:50  luntan\dangqianxinxi\
     文件       10195  2008-01-02 15:32  luntan\dangqianxinxi\dqyhxinxixg.aspx
     文件        4338  2008-01-03 14:53  luntan\dangqianxinxi\dqyhxinxixg.aspx.cs
     文件       17858  2008-01-02 10:49  luntan\dangqianxinxi\xiangxixinxi.aspx
     文件        2444  2008-01-10 13:41  luntan\dangqianxinxi\xiangxixinxi.aspx.cs
     文件       11281  2008-01-08 13:20  luntan\Default.aspx
     文件        4975  2008-01-10 14:38  luntan\Default.aspx.cs
     目录           0  2018-05-22 14:50  luntan\denglu\
     文件       14600  2008-01-02 15:57  luntan\denglu\denglu.aspx
     文件        2350  2008-01-03 15:27  luntan\denglu\denglu.aspx.cs
     目录           0  2018-05-22 14:50  luntan\image\
     文件        1361  2007-12-06 15:58  luntan\image\baocun an niu.gif
     文件       11566  2008-01-08 11:43  luntan\image\biaotilan.gif
     文件          67  2003-12-23 18:11  luntan\image\bkline.gif
     文件         149  2007-12-01 20:10  luntan\image\daohang1.gif
     文件        1550  2007-12-01 21:04  luntan\image\denglu an niu.gif
     文件        1079  2007-12-06 14:39  luntan\image\f zhu ti 1.gif
     文件         156  2007-12-06 14:38  luntan\image\f zhu ti 2.gif
     文件         559  2007-12-06 14:39  luntan\image\f zhu ti 3.gif
     文件        1594  2007-12-01 20:31  luntan\image\faxintie an niu.gif
     文件       45105  2007-12-01 20:05  luntan\image\index_02.gif
     文件        8961  2007-12-01 20:05  luntan\image\index_05.gif
     文件        4005  2007-12-01 20:05  luntan\image\index_08.gif
     文件        4210  2007-12-01 20:05  luntan\image\index_17.gif
     文件          90  2007-12-01 20:05  luntan\image\index_20.gif
     文件          64  2007-12-01 21:13  luntan\image\jian tou.gif
............此处省略50个文件信息

评论

共有 条评论