I have a calendar control. If the user wants to backdate (ie, SelectedDate < Today), then I want to display a confirm messagebox asking the user: 'Are you sure you want to backdate?'

Calendar Control has a OnDayRender event that you can handle. In the eventhandler, for all date before today's date, add the javascript: confirm() function to the OnClick attribute as follows:


protected void cal_DayRender(object sender, DayRenderEventArgs e)
{
	if(e.Day.Date < DateTime.Today)
		e.Cell.Attributes.Add("OnClick", "return confirm('Are you sure
					you want to backdate?');");
}