T
tommasop
I'm developing a custom server control that should take a datasource
and its Type and from its Type instantiate internal objects to display
data.
MyServerComponent mySrv = new MyServerComponent();
mySrv.DataSource = My.NewsManager.GetObjects();
mySrv.ObjectType = typeof(News);
Internally I would like to be able to do something like this:
((ObjectType)myObj).Title = TitleTbox.Text;
Using ObjectType to instantiate, cast objects to actual object class.
Is it possible?
Is there any workaround?
Thanks
Tommaso Patrizi
and its Type and from its Type instantiate internal objects to display
data.
MyServerComponent mySrv = new MyServerComponent();
mySrv.DataSource = My.NewsManager.GetObjects();
mySrv.ObjectType = typeof(News);
Internally I would like to be able to do something like this:
((ObjectType)myObj).Title = TitleTbox.Text;
Using ObjectType to instantiate, cast objects to actual object class.
Is it possible?
Is there any workaround?
Thanks
Tommaso Patrizi