A
adiel_g
I added a user control to a webform in Asp.net 2.0. I am also adding
several other user controls to this webform. Now I am trying to find
a way to stop the user controls from loading up when I call the
webform. I could possibly have 10 user controls in this page and I
would not want all of them to load up. I would like to control which
user control loads up. I have tried placing each user control in a
separate placeholder and then disabling the place holder for the
controls I don't need on the page_load of the webform. But, I notice
the control still loads because I placed a break point in the
page_load of the user control and it is still being hit. I even tried
using the following code:
Me.Controls.Remove(UserControl1)
In the page_load of the main webform but the controls still loads!
How can I stop the user control from loading up at all? I hope this
is not a limitation of Asp.net 2.0 in that the user control HAS to
load once it is added to a webform...
Thanks Before Hand,
Adiel
several other user controls to this webform. Now I am trying to find
a way to stop the user controls from loading up when I call the
webform. I could possibly have 10 user controls in this page and I
would not want all of them to load up. I would like to control which
user control loads up. I have tried placing each user control in a
separate placeholder and then disabling the place holder for the
controls I don't need on the page_load of the webform. But, I notice
the control still loads because I placed a break point in the
page_load of the user control and it is still being hit. I even tried
using the following code:
Me.Controls.Remove(UserControl1)
In the page_load of the main webform but the controls still loads!
How can I stop the user control from loading up at all? I hope this
is not a limitation of Asp.net 2.0 in that the user control HAS to
load once it is added to a webform...
Thanks Before Hand,
Adiel