protected void DeleteItemBtn_Click(object sender, EventArgs e) { LinkButton cmdBtn = (LinkButton)sender; int shoppingcartitemid = int.Parse(cmdBtn.CommandArgument); MessageUserControl.TryRun(() => { ShoppingCartController sysmgr = new ShoppingCartController(); sysmgr.DeleteItemFromCart(User.Identity.Name, shoppingcartitemid); ShoppingCartItemListView.DataBind(); FetchShoppingCartTotal(); DisplayCurrentCartQty(); if (!CheckForItemsInCart()) { checkoutBtn.HRef = "~/Pages/Sales/PartsCatalog.aspx"; } }, "Removal Successful", "Part was successfully removed form your shopping cart"); }