M
Matt Tapia
I having a problem that receives the following error:
Specified cast is not valid
And I need some help. Here is what is happening:
I have a form with a drop-down control that contains a list of control names
(TextBox, DropDownList, Calendar). On Post back of this drop-down control, I
clear a panel control (I have on the same page) of all its controls, then
dymamically add the selected control to the panel. For example, if in ddl
control I had TextBox and switched it to Calendar, on postback the panel is
cleared of the TextBox control and the Calendar control is added. So far no
problem.
However, if i select a date on the calendar control, then change the drop
down control to either Text Box or Drop Down list, I get the error above
when adding the control to the panel (after I cleared out the old control).
What's going on?
Specified cast is not valid
And I need some help. Here is what is happening:
I have a form with a drop-down control that contains a list of control names
(TextBox, DropDownList, Calendar). On Post back of this drop-down control, I
clear a panel control (I have on the same page) of all its controls, then
dymamically add the selected control to the panel. For example, if in ddl
control I had TextBox and switched it to Calendar, on postback the panel is
cleared of the TextBox control and the Calendar control is added. So far no
problem.
However, if i select a date on the calendar control, then change the drop
down control to either Text Box or Drop Down list, I get the error above
when adding the control to the panel (after I cleared out the old control).
What's going on?