Hello Brian,
I stumbled into the same problem as you did while developing a composite servercontrol for handling dates. After some brainwork I found a solution on how to access the different values of the childcontrols in the control.
I know you are talking about properties, but this solution works fine for me and might give you a hint on how to solve your problem.
Best regards - Dan
Code:
bool IPostBackDataHandler.LoadPostData(string postDataKey,
NameValueCollection values)
{
DateTime postedValue;
_year = (values[postDataKey + ":cboYear"] != null ? (int)System.Convert.ToInt16(values[postDataKey + ":cboYear"]) : -1);
_month = (values[postDataKey + ":cboMonth"] != null ? (int)System.Convert.ToInt16(values[postDataKey + ":cboMonth"]) : -1);
_day = (values[postDataKey + ":cboDay"] != null ? (int)System.Convert.ToInt16(values[postDataKey + ":cboDay"]) : -1);
_hour = (values[postDataKey + ":cboHour"] != null ? (int)System.Convert.ToInt16(values[postDataKey + ":cboHour"]) : -1);
_minute = (values[postDataKey + ":cboMinute"] != null ? (int)System.Convert.ToInt16(values[postDataKey + ":cboMinute"]) : -1);
if(_year==-1&&_month==-1&&_day==-1&&_hour!=-1&&_minute!=-1)
{
_currentDateTime = System.Convert.ToDateTime(values[postDataKey + ":inputCurrentDateTime"]);
_year = _currentDateTime.Year;
_month = _currentDateTime.Month;
_day = _currentDateTime.Day;
}
if(_year!=-1&&_month!=-1&&_day!=-1&&_hour!=-1&&_minute!=-1)
{
postedValue = new DateTime(_year,
_month,
_day,
_hour,
_minute, 0);
this.SelectedDate = postedValue;
return true;
}
return false;
}