R
Robert Bravery
Hi All,
I have an asp page with a wizard. On each page of the wizard I have
different user controls with objects on for user input. Like textboxes,
radiobuttonlist etc
I have also set up a controler class, which has the job of loading and
saving data from the form to a model
In order to get the control values I used this method
TextBox CompanyName = cntrl.FindControl("CompanyName") as TextBox
then I load the value into my model like so
cntrl.comp.IndividualShareholderCollection[ind].CompanyName
This works fine for a few controls on the form
But when there are large amounts of data to input, I don't want to go
through this manual process.
SO I thought of using reflection. I can reflect throu my model class an get
its properties and values and set its values.
But I am haing difficulty on how I can reflect through the usercontrol on
the wizard to get the controls and its values
Any help in pointing me in the right direction is appreciated
Thanks
Robert
I have an asp page with a wizard. On each page of the wizard I have
different user controls with objects on for user input. Like textboxes,
radiobuttonlist etc
I have also set up a controler class, which has the job of loading and
saving data from the form to a model
In order to get the control values I used this method
TextBox CompanyName = cntrl.FindControl("CompanyName") as TextBox
then I load the value into my model like so
cntrl.comp.IndividualShareholderCollection[ind].CompanyName
This works fine for a few controls on the form
But when there are large amounts of data to input, I don't want to go
through this manual process.
SO I thought of using reflection. I can reflect throu my model class an get
its properties and values and set its values.
But I am haing difficulty on how I can reflect through the usercontrol on
the wizard to get the controls and its values
Any help in pointing me in the right direction is appreciated
Thanks
Robert