This error keeps popping up and I can't seem to figure out where it's coming from. Any jelp is appreciated. Thanks
if (!IsPostBack)
{
DataTable LocalCart = new DataTable();
LocalCart = (DataTable)Session["cart"];
int LocalCartItemCount = (int) Session["CartItemCount"];
Decimal LocalCartAmount = (Decimal)Session["CartAmount"];
if (LocalCart.Rows.Count == 0)
{
titleLabel.Text = "Your shopping cart is empty!";
GridCart.Visible = false;
updateButton.Enabled = false;
checkoutButton.Enabled = false;
totalAmountLabel.Text = String.Format("{0:c}", 0);
}
else
{
GridCart.DataSource = LocalCart;
GridCart.DataBind();
titleLabel.Text = "These are the products in your shopping cart:";
GridCart.Visible = true;
updateButton.Enabled = true;
checkoutButton.Enabled = true;
totalAmountLabel.Text = String.Format("{0:c}", LocalCartAmount);
}
It's saying the error is here ->
int LocalCartItemCount = (int) Session["CartItemCount"];