Wasif
Wasif

Reputation: 495

Asp.net Calendar Event Issue

i have an Issue i am developing a reservation management Issue when user Complete his/her reservation by Selecting date from Calendar and when user Click on the same date again the Selection_index change event did't fire please help me out (in Hourly reservation when user click on date the Checkbox list of available hours are displayed but when user click on same date nothing happen event is't fire )

please help me Out.

Thanks

Upvotes: 1

Views: 2709

Answers (1)

Denys Wessels
Denys Wessels

Reputation: 17049

I agree with Brad, could you please explain why you need to fire the event again if the same date is selected in the calendar control?

The selected date of the calendar control gets stored in view state and the SelectionChanged event is not raised as the current selection gets compared to what is in view state.

If you really want to raise SelectionChanged even when the same date is selected, simply disable view state of the calndar control on page load

protected void Page_Load(object sender, EventArgs e)
{
    Calendar1.EnableViewState = false;
}

Upvotes: 1

Related Questions