protected void Button1_Click(object sender, EventArgs e)
{
string strSql, dbFile;
dbFile = "Dbase.mdb";
OleDbConnection c = new OleDbConnection();
c.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + HttpContext.Current.Server.MapPath("~/admin/App_Data/" + dbFile);
OleDbCommand comm = new OleDbCommand();
comm.Connection = c;
strSql = "UPDATE [products] SET [title] = @title, [picture]=@picture,[cat]=@cat,[price]=@price,[info]=@info,[picture]=@picture where [id] =" + Request.QueryString["teer"];
comm.CommandText = strSql;
//add our parameters to our command object
comm.Parameters.AddWithValue("@title", TextBox1.Text);
comm.Parameters.AddWithValue("@picture", Image1.ImageUrl);
comm.Parameters.AddWithValue("@cat", DropDownList1.SelectedValue);
comm.Parameters.AddWithValue("@price", TextBox5.Text);
comm.Parameters.AddWithValue("@info", TextBox2.Text);
comm.Parameters.AddWithValue("@picture", TextBox4.Text);
c.Open();
comm.ExecuteNonQuery();
c.Close();
}