I
Iza
Hi
I'm trying to instantiate 2 UserControls in an aspx page:
....
<MyNamespace:MyControl1 ID="ctrl1" runat="server" ParentWindow="<%#
this %>" />
<MyNamespace:MyControl2 ID="ctrl2" runat="server" Args="<%# ctrl1
%>" />
....
I have 2 corresponding classes with their public properties
ParentWindow and Args respectively.
Now, what happens is that the classes are instantiated and
variables "this" and "ctrl1" are correctly initialized in aspx but
they are null when referenced in class properties. Why?
I would appreciate any ideas.
The objects are required to be created in this manner, in ASPX page,
so instatiating them in C# code is not an option.
I'm trying to instantiate 2 UserControls in an aspx page:
....
<MyNamespace:MyControl1 ID="ctrl1" runat="server" ParentWindow="<%#
this %>" />
<MyNamespace:MyControl2 ID="ctrl2" runat="server" Args="<%# ctrl1
%>" />
....
I have 2 corresponding classes with their public properties
ParentWindow and Args respectively.
Now, what happens is that the classes are instantiated and
variables "this" and "ctrl1" are correctly initialized in aspx but
they are null when referenced in class properties. Why?
I would appreciate any ideas.
The objects are required to be created in this manner, in ASPX page,
so instatiating them in C# code is not an option.