By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,581 Members | 2,007 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,581 IT Pros & Developers. It's quick & easy.

How to trigger Page_Load when setting in code dynamically the User controls Visible=True?

P: n/a

I have an ASPX Page with 8 Web User Controls on it.
Some are Visible = False and some are Visible = True

Now I wrote in each Web User Control code:

Sub Page_Load()
If Me.Visible Then
Me.lblName = "Hello World"
'...Fill all my labels
End If
End Sub

Now I am looking for a better solution because I do this
in my ASPX Code

If something = true then
Control3.Visible = True
End If

Now my Page gets rendered without filling my labels in control3 because
Page_Load is fired before.
What is the solution for this? Should I use in my Web User Controls
Page_PreRender or
is there a better solution for handling Page_Loads and the Visibilty of

Thanks for any help in advance!!

Nov 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.