User2118470126 posted
Hi,
I've been developing some business objects to use with an ObjectDataSource and some custom controls. Business objets' properties have some custom attributes that describe the type of field, it it's required, some masks, and other properties which will allow
me to automatically set some client-side behaviors and some server-side properties (such as styles) for the control. I'm trying (without success) to acess the object's at design time from my custom controls.
With a custom DataBindingHandler attached I can access the field name the custom control is bound to, and I can recursively find the ObjectDataSource control in the page. Then I can get the ObjectDataSource.TypeName, but I'm not able to intantiate the Type
at design-time. I've tried with Activator.CreateInstance which doesn't work and with the BuildManager.
I think the problem could be related with the fact that I'm not able to find the assembly the business objects reside on (which is in a WebSite solution, and my custom controls are in a library of components this web site uses), but maybe the problem is
in my approach. Any suggestions?
Any help would be much appreciated.
Thank you,