S
savvy
I'm developing a shopping cart. I've assigned some Session values to
Labels on the Master Page. The Basket panel which is small window for
the basket items will be visible on every page if there are any items
in the basket. It will display Total Quantity and Total Price in that
window. The Master Page code shown below
protected void Page_Load(object sender, EventArgs e)
{
if (Convert.ToString(Session["Total"]) != string.Empty)
{
pllogin.Visible = false;
plbasket.Visible = true;
lblquantity.Text = Convert.ToString(Session["TotQty"]);
lblprice.Text = Convert.ToString(Session["Total"]);
}
}
Hope i made myself clear till now.
In the basket Page , i'm calculating the total Price and Quantity and
storing them in Sessions as shown below
Session["Total"] = GetProductTotal();
Session["TotQty"] = intQty;
So, basically on the basket page when i press the Update button I want
the Master page values to get updated and be displayed in the small
window which is not happening straight away, So I need to refresh the
page to get it updated, which is not what i want.
Should I be using any classes (.cs) outside the page ?
Is there anyway to get over this problem ?
Am i going in the right directions ?
Thanks for your help and time in Advance
Labels on the Master Page. The Basket panel which is small window for
the basket items will be visible on every page if there are any items
in the basket. It will display Total Quantity and Total Price in that
window. The Master Page code shown below
protected void Page_Load(object sender, EventArgs e)
{
if (Convert.ToString(Session["Total"]) != string.Empty)
{
pllogin.Visible = false;
plbasket.Visible = true;
lblquantity.Text = Convert.ToString(Session["TotQty"]);
lblprice.Text = Convert.ToString(Session["Total"]);
}
}
Hope i made myself clear till now.
In the basket Page , i'm calculating the total Price and Quantity and
storing them in Sessions as shown below
Session["Total"] = GetProductTotal();
Session["TotQty"] = intQty;
So, basically on the basket page when i press the Update button I want
the Master page values to get updated and be displayed in the small
window which is not happening straight away, So I need to refresh the
page to get it updated, which is not what i want.
Should I be using any classes (.cs) outside the page ?
Is there anyway to get over this problem ?
Am i going in the right directions ?
Thanks for your help and time in Advance