Session Value Updating and Javascript Navigatin Problem?


S

savvy

I am developing a shopping cart in which for the top-menu navigation
I'm using Javascipt.I have a small Item basket which shows up in all
the pages when an Item is added to the main basket. And i'm using
Sessions for this Items basket. In all pages I'm able to see the exact
value of Sessions when the pages are posted back but when I'm
navigating using Javascript to a particular page I'm not able to see
any of changes in the Items basket,
and when I refresh the page I can get the current values.
I can see that the page is not posted back when I click the particular
page Javascript URL
I'm not uisng any Master Pages as I couldn't coz of the front end
complications.

I know that Javascript is a client side functinality but Is there any
way so that I can update the session values on the page which i'm
navigating using Javascript menu ?

Or Is there any way so that I can get the particular page values in the
Main Basket page and update them there as we can do in the Master pages
??

Or Is it possible to refresh ONCE the page when the page is loaded ?
Hope I made myself clear

Thanks in advance for your help and time

Some Code for reference
protected void Page_Load(object sender, EventArgs e)
{
if (Convert.ToString(Session["Total"]) == string.Empty)
{
pllogin.Visible = true;
plbasket.Visible = false;
}
else
{
pllogin.Visible = false;
plbasket.Visible = true;
lblquantity.Text = Convert.ToString(Session["TotQty"]);
lblprice.Text = Convert.ToString(Session["Total"]);
}
}
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top