views:

171

answers:

2

Hi All,

I've implemented the ASP.NET Calendar control. I'm using it to show events happening in the area.

THE PROBLEM

Today is August 18th, so when the calendar loads, August is selected as the current month. If I navigate to say October, and then navigate to another page and then try to go back to the page with the Calendar by clicking the browser Back button, the Calendar resets back to August, instead of remaining at October.

Can anyone recommend how I may circumvent this?

Thanks!

A: 

Try adding this attribute to the calendar definition in the HTML part of the page?

EnableViewState="true"
Hooloovoo
Thanks, I will try that this evening and see if that does the trick. I'll respond back to let you know.
Thanks for the tip, but unfortunately that didn't solve my problem. I also ensured that I enabled the Viewstate for the page, and handled the IsPostBack.Any other ideas? Has anyone succeeded in doing this?
A: 

what u described is how it should happen, as when u click the back button, the page is loaded as a fresh page nothing wrong with that..

what u can try

  • is to save the month and the date selected, to a Cookie file or "session variables" or "global variable" while navigating away from page

  • on page load, "try" to set the values of month and date to what is stored in the lets say "session variable".

hope this helps