M
Merrycoder
I'm trying to check the validity of a server controls property at compile
time. Let's say I have my control embedded in a page like so:
<cc1:MyControl ID="MyControl1" TheObject="<%# oPerson %>"
PropertyName="FirstName" runat="server" />
The control's property references the page level object instance oPerson.
What I would like to do is to find out the type of the field 'oPerson' and if
it has a property 'FirstName'. If not, compilation should fail. I have been
playing around with a custom ControlBuilder but with no success.
Does anyone have a solution? My eternal gratefulness would be yours
Regards
Stefan
time. Let's say I have my control embedded in a page like so:
<cc1:MyControl ID="MyControl1" TheObject="<%# oPerson %>"
PropertyName="FirstName" runat="server" />
The control's property references the page level object instance oPerson.
What I would like to do is to find out the type of the field 'oPerson' and if
it has a property 'FirstName'. If not, compilation should fail. I have been
playing around with a custom ControlBuilder but with no success.
Does anyone have a solution? My eternal gratefulness would be yours
Regards
Stefan