I have a standard web form that includes a custom web control, EditHost. EditHost is used as a container for all online editing functions like modifying people records, etc. Depending on user permissions, some controls such as AdministerUsers get loaded, some don't.
We have been dynamically loading the EditPerson custom web control, which itself contains other custom web controls representing multiple phone numbers, etc. All good OO design.
Trouble is, that when one clicks a link in the EditPhoneNumber control, the whole page reposts and recreates the parent form's controls, throwing
"A control cannot modify its parents' control collections"
We aren't trying to modify the parent forms' controls. Our great-grandchild form is just reacting to a postback, which forces the controls to be recreated.
How do we avoid this?
-Brian
We have been dynamically loading the EditPerson custom web control, which itself contains other custom web controls representing multiple phone numbers, etc. All good OO design.
Trouble is, that when one clicks a link in the EditPhoneNumber control, the whole page reposts and recreates the parent form's controls, throwing
"A control cannot modify its parents' control collections"
We aren't trying to modify the parent forms' controls. Our great-grandchild form is just reacting to a postback, which forces the controls to be recreated.
How do we avoid this?
-Brian