Interviewer And Interviewee Guide

Web Forms Interview Question:

How to select multiple non-sequential dates at Code-Behind in Microsoft web forms?

Submitted by: Administrator
Invoke the member function ‘Add' of the control's SelectedDates collection. You can add dates in any sequence, because the collection will automatically arrange them in order for you.

protected void Calendar1_SelectionChanged(object sender, EventArgs e)
{
Calendar1.SelectedDates.Clear();
Calendar1.SelectedDates.Add(new DateTime(2008, 8, 1));
Calendar1.SelectedDates.Add(new DateTime(2008, 8, 7));
Calendar1.SelectedDates.Add(new DateTime(2008, 8, 15));
}
Submitted by: Administrator

Read Online Web Forms Job Interview Questions And Answers
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.