//public Productupdate() //{ // con = new SqlConnection("Data Source = ACUPC-0906; Initial Catalog = Assignment22sep; Integrated Security = True"); //} protected void btnupdate_Click(object sender, EventArgs e) { RepositoryFile rf = new RepositoryFile(); int id = Convert.ToInt32(txtid.Text); string name = txtname.Text; string img = txtimage.Text; double price = Convert.ToDouble(txtprice.Text); string desc = txtdesc.Text; int brandid = DropDownList1.SelectedIndex; rf.UpdateDetails(id, name, img, price, desc, brandid); lblupdate.Text = "updated successfully"; }