Click here to Skip to main content
14,450,027 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi guys! I have a problem with the Calendar control in ASP.NET, or better to say it's annoying thing rather then a problem. I have events in my database and when a date from a calendar is selected, under the calendar are shown the events on this date. This works great, I made this, and everything is fine, except the "little" annoying thing with the calendar when every time you click on a date it refreshes itself. I don't want this, cause for example if the user is in the previous or next month and selects a date, it shows him the events for this date but the calendar after the click refreshes and it's on the current month. I would like to stay on the month and day on which the user clicked, after the click. I read about it, and why the calendar refreshes the whole page, there is a solution like "update panel"... but this prevents the rest of the page from refreshing, and I need the rest of the page to refresh and to show the events when it's clicked but I don't want the Calendar to refresh... I tried with explicit selection on calendar's date in page load, but it's not working. Thank you in advance!
Updated 13-Feb-20 3:29am
Rate this:
Please Sign up or sign in to vote.

Solution 1

you can user jquery UI Calender control
if you really want to user calender control then you can user update panel.
Rate this:
Please Sign up or sign in to vote.

Solution 2

Try unsubscribe from the calandar click event, something like this:

Calendar1_SelectionChanged -= thisCalendar1_SelectionChanged;

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100