//public NewProduct() //{ // con = new SqlConnection("Data Source = ACUPC-0906; Initial Catalog = Assignment22sep; Integrated Security = True"); //} protected void btnadd_Click(object sender, EventArgs e) { RepositoryFile rf = new RepositoryFile(); string name = txtname.Text; string img = txtimg.Text; double price = Convert.ToDouble(txtprice.Text); string desc = txtdesc.Text; int brandid = ddlid.SelectedIndex; rf.InsertDetails(name, img, price, desc, brandid); lbltxt.Text = "inserted successfully"; }