protected void addbtn_Click(object sender, EventArgs e) { string d = null; if (Categery.SelectedValue == "Men") { d = "images/Items/men/" + FileUpload1.FileName; } else { d = "images/Items/women/" + FileUpload1.FileName; } try { store = new Item(Categery.SelectedValue, d, DateTime.Parse(EndDate.Text), Double.Parse(StartPrice.Text), ItemName.Text, productDiscription.Text, Int32.Parse(quntity.SelectedValue)); items.StoreMake(store); items.Addcondition(Double.Parse(StartPrice.Text), items.getlastraw()); errro.Text = "Sucessfully Uploaded"; }catch (Exception) { errro.Text = "There some thing erros occur in this fileds..."; } }