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 update : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            DB db = new DB();
            int imageID=Convert .ToInt32 (Request .QueryString ["imageID"]);
            TextBox1 .Text =db .select_Desc (imageID ).Rows [0][0].ToString ();
        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        DB db = new DB();
        int albumID = Convert.ToInt32(DropDownList1.SelectedValue);
        string imageDesc = TextBox1.Text.ToString();
        int imageID = Convert.ToInt32(Request.QueryString["imageID"]);
        db.update(albumID, imageDesc, imageID);
        Response.Write("<script>alert('修改成功');location.href='default.aspx?';</script>");
                                

    }
}
