I
Ivan A. Vasilyev
Hello.
Could anyone please clarify one thing.
Suppose I have to classes:
1. A inherits UserControl
2. B inherits A
BOTH A AND B HAVE HTML MARKUP IN RELATED ASCX FILES.
Then suppose I want to instantiate control B. I have three options:
1. Propgrammatically instatiate B through new B();
2. Propgrammatically instatiate B through LoadControl("B.ascx");
3. Declare control B in ASPX/ASCX of a container and refer B in code-behind
file of a container.
The quiestion is the following: Which of instantiation options are correct
to use?
I've tried (3) but it seems that html markup (in ASCX) of class A isn't
being parsed, so those children of A (from ASCX) are not being created.
TIA
Could anyone please clarify one thing.
Suppose I have to classes:
1. A inherits UserControl
2. B inherits A
BOTH A AND B HAVE HTML MARKUP IN RELATED ASCX FILES.
Then suppose I want to instantiate control B. I have three options:
1. Propgrammatically instatiate B through new B();
2. Propgrammatically instatiate B through LoadControl("B.ascx");
3. Declare control B in ASPX/ASCX of a container and refer B in code-behind
file of a container.
The quiestion is the following: Which of instantiation options are correct
to use?
I've tried (3) but it seems that html markup (in ASCX) of class A isn't
being parsed, so those children of A (from ASCX) are not being created.
TIA