protected void SelectAssetCheckBox_CheckChanged(object sender, EventArgs e)
        {
            CheckBox SelectAssetCheckBox = (CheckBox)sender;

            foreach (RepeaterItem ri in CartRepeater.Items)
            {
                switch (ri.ItemType)
                {
                case (ListItemType.Item):
                case (ListItemType.AlternatingItem):

                    Control cb = ri.FindControl(SelectAssetCheckBox.ID);

                    if (cb != null && cb.UniqueID == SelectAssetCheckBox.UniqueID)
                    {
                        HiddenField CartIdHiddenField = (HiddenField)ri.FindControl("CartIdHiddenField");
                        int         cartId            = Convert.ToInt32(CartIdHiddenField.Value);

                        if (SelectAssetCheckBox.Checked)
                        {
                            if (!SelectedCartItemIdList.Contains(cartId))
                            {
                                SelectedCartItemIdList.Add(cartId);
                            }
                        }
                        else
                        {
                            if (SelectedCartItemIdList.Contains(cartId))
                            {
                                SelectedCartItemIdList.Remove(cartId);
                            }

                            AllAssetsSelected = false;
                        }
                    }

                    break;
                }
            }
        }
 private bool IsCartItemSelected(int cartId)
 {
     return(AllAssetsSelected || SelectedCartItemIdList.Contains(cartId) || IsCartItemSelectedOnPage(cartId));
 }