M
mAbZ
I neeed to instantiate an UserControl in an aspx page like this:
<MyNamespace:MyControl ID="ctrl1" runat="server" MyParent="<%# this %>" />
where "this" is the current aspx page and should be assigned to
property Parent contained in MyControl class.
Above code is contained in a PlaceHolder.
When debuging, "this" is not null (obviously) but
value in MyParent property's setter is null.
So the reference is not beaing passed.
What am I missing??
I could set this value in OnDataBind but don't know how to get it there from
the aspx page.
I've been reading a number of tutorials on DataBinding, but not found any
solution to this.
Please, help!
<MyNamespace:MyControl ID="ctrl1" runat="server" MyParent="<%# this %>" />
where "this" is the current aspx page and should be assigned to
property Parent contained in MyControl class.
Above code is contained in a PlaceHolder.
When debuging, "this" is not null (obviously) but
value in MyParent property's setter is null.
So the reference is not beaing passed.
What am I missing??
I could set this value in OnDataBind but don't know how to get it there from
the aspx page.
I've been reading a number of tutorials on DataBinding, but not found any
solution to this.
Please, help!