protected void btnAddCategory_Click(object sender, EventArgs e) { if (txtAddCategory.Text != null) { aProductCategory.ProductCategoryName = txtAddCategory.Text; } else { txtAddCategory.Focus(); } int rowAffected = aProductCategoryManager.InsertCategory(aProductCategory.ProductCategoryName); if (rowAffected > 0) { lblCategoryAddMessage.Text = "Category Successfull Added"; } else { lblCategoryAddMessage.Text = "Category Not Added"; } }