using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
public partial class Default2 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        int ArticleID = Convert.ToInt32(Request.QueryString["ArticleID"]);
        string constr = ConfigurationManager.ConnectionStrings["BlogConnectionString"].ConnectionString;
        SqlConnection con = new SqlConnection(constr);
        con.Open();
        string sqlstr = "select  *  from Articles  where  ArticleID='" + ArticleID.ToString() + "'";
        SqlCommand cmd = new SqlCommand(sqlstr, con);
        SqlDataReader sdr = cmd.ExecuteReader();
        while (sdr.Read())
        {
            title.Text = sdr["Title"].ToString();
            PublishedTime.Text = sdr["PublishedTime"].ToString();
            content.Text = sdr["A_Content"].ToString();
        }
        sdr.Close();
        con.Close();
    }
}
