private void update_quantity(int id, int quantity) { //TextBox data = (TextBox)sender; //if (data.Text != null) //{ //int[] info = data.Text.Split(',').Select(n => Convert.ToInt32(n)).ToArray(); //int cartId = Convert.ToInt32(data); //int quantity = Convert.ToInt32(info[1]); //Update purchase with new quantity and refresh page PurchaseModel cartModel = new PurchaseModel(); cartModel.update_quantity(id, quantity); Response.Redirect("cart.aspx"); //} }