protected void addButtonClickPerformed(object sender, EventArgs e) { /* * check whether user fill all the required filed or not * server-site validation */ if (IsValid) { Category category = new Category { CategoryName = txtCategoryName.Text, CategoryDescription = taDescription.InnerText, }; ECommerceBusiness ecb = new ECommerceBusiness { CategoryObj = category }; ecb.AddNewCategory(); resetForm(); Page.ClientScript.RegisterStartupScript(this.GetType(), "Confirmation", "alert('Successfully added a new category into database')", true); } }