G
Gonçalo Boléo
I have an ASCX control with 2 objects (asp:label and asp:xml)
I wan't to add this control using Controls.Add() because my business logic
requires to select the correct control to show.
I have some code on ASCX page_load event that makes references to asp:label
(only set text property to it) and asp:xml.
If i add the control directly in an ASPX page i have no problems but if i
add it with Controls.Add() i have the following error: "Object reference not
set to an instance of an object"
What could be the solution? Should i put the logic in another event?
thanks,
Gonçalo Boléo
I wan't to add this control using Controls.Add() because my business logic
requires to select the correct control to show.
I have some code on ASCX page_load event that makes references to asp:label
(only set text property to it) and asp:xml.
If i add the control directly in an ASPX page i have no problems but if i
add it with Controls.Add() i have the following error: "Object reference not
set to an instance of an object"
What could be the solution? Should i put the logic in another event?
thanks,
Gonçalo Boléo