Angelina_ragazza Ответов: 2

Как избежать контроля календаря в ASP.net чтобы обновить после выбранной даты?


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!

2 Ответов

Рейтинг:
2

ivike

Попробуйте отказаться от подписки на событие calandar click, что-то вроде этого:

Calendar1_SelectionChanged -= thisCalendar1_SelectionChanged;


Рейтинг:
1

manak chand

вы можете управлять календарем пользовательского интерфейса jquery
или
если вы действительно хотите пользователь asp.net управление календарем, то вы можете обновить панель пользователя.