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;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            h2.InnerHtml = "最近的发表的帖子";
            string sql = "select top 10 article.id,replaynum,readnum,title,username,classname,time from article,[user] where " +
                    "userid=authorid order by article.id desc";
            DataSet ds = DbManager.getDataSet(sql, "newArticle");
            this.articlelist.DataSource = ds.Tables["newArticle"];
            this.DataBind();
            DbManager.closeConnection();
        }
    }
}
