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;

public partial class manage_newsmodi2 : System.Web.UI.Page
{
    Int32 nid;
    protected void Page_Load(object sender, EventArgs e)
    {
        nid = Convert.ToInt32(Request.QueryString["nid"]);
        if (!IsPostBack)
        {
            DataRow dr = oper.dr("select * from news where nid=" + nid);
            TextBox1.Text = dr["ntitle"].ToString();
            TextBox2.Text = dr["ncontent"].ToString();
        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        string sql1 = "update news set ntitle='" + TextBox1.Text + "',ncontent='"+TextBox2.Text+"' where nid=" + nid;
        oper.opertb(sql1);
        Response.Redirect("newsmodi.aspx");
    }
}
