Peter Thopson

Peter Thopson

  • NA
  • 5
  • 463

Calendar Controls in Webforms

Dec 16 2020 6:05 AM
I want to take the selected date from the calendar control and pass to the argument.
  1. protected void Calendar1_SelectionChanged(object sender, System.EventArgs e)  
  2. {  
  3. _availebletimeSlotsRoom1 = new BindingList<string>(_allTimeSlots.ToList());  
  4. _availebletimeSlotsRoom2 = new BindingList<string>(_allTimeSlots.ToList());  
  5. _availebletimeSlotsRoom3 = new BindingList<string>(_allTimeSlots.ToList());  
  6. _availebletimeSlotsRoom4 = new BindingList<string>(_allTimeSlots.ToList());  
  7. DLAvailTS1.DataSource = _availebletimeSlotsRoom1;  
  8. DLAvailTS2.DataSource = _availebletimeSlotsRoom2;  
  9. DLAvailTS3.DataSource = _availebletimeSlotsRoom3;  
  10. DLAvailTS4.DataSource = _availebletimeSlotsRoom4;  
  11. UpdateRoom(1, e.Start, _availebletimeSlotsRoom1); //ERROR HERE:'EventArgs' does not contain a definition for 'Start' and no extension method 'Start' accepting a first argument of type 'EventArgs' could be found (are you missing a using directive or an assembly reference?)  
  12. UpdateRoom(2, e.Start, _availebletimeSlotsRoom2);  
  13. UpdateRoom(3, e.Start, _availebletimeSlotsRoom3);  
  14. UpdateRoom(4, e.Start, _availebletimeSlotsRoom4);  
  15. }  
This procedure starts after a change of the selected dates in the Calendar1 control.
 
Parameter 'e' does not have not property Start.
 
How can I get the Start from the Calendar Object

Answers (3)