473,516 Members | 2,711 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

Hello,

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
controls.

Thanks for any help in advance!!
Andreas

Nov 18 '05 #1
0 1265

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
1421
by: Stanley J Mroczek | last post by:
I Set the EditCommandColumn to Visible=False to stop people who are not allowed to make any changes to a record. How can set it to Visible=true for some users? Please answer in VB Thanks Stan
4
4330
by: Confused White Guy | last post by:
I have a C# winforms app in which I am calling a method on a different thread, using the Thread.Start() method. The method that is being executed on the new thread attempts to make a button visible and a panel visible after doing some work asynchronously. The button and panel are private to the form that contains both the method that starts...
0
995
by: Andreas Klemt | last post by:
Hello, 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"
0
320
by: Andreas Klemt | last post by:
Hello, 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"
1
8346
by: Edward | last post by:
I am having a terrible time getting anything useful out of a listbox on my web form. I am populating it with the results from Postcode lookup software, and it is showing the results fine. What I want to do is to allow the user to click on the row that corresponds to the correct address, and have the code behind populate the form's...
4
1880
by: WB | last post by:
Hi, How can I generate web controls such as textboxes and drop-menus on the fly? My web application allows users to fill out PDF forms online. There are many PDF forms, and my application reads the fields in the user's chosen PDF file, displays a webform with relevant fields (textbox or drop-menu or radio buttons etc) for user to fill out...
0
1226
by: ChrisMiddle10 | last post by:
Hey All, I suppose the subject says it all. I'm new to the IHttpHandler interface. I'm just trying to figure out how long - by default - an instance of an HttpHandler is kept alive when the reusable property is "true". Is this duration configurable? If so, how? ( I assumed - initially - that it would be kept alive from the point in time...
4
2491
by: peerraghu | last post by:
hi I am creating travels project, in left part of my datagrid of my default page i placed all the products such as india tour ,world tour etc and if v click any product it will redirect to itennary page according to their ID's my problem is i inserted new product as Hotel Booking and i want to place textbox and a button in the itenary page...
2
2680
by: mylog | last post by:
Hi all, I am having a small problem on getting the values of the dynamically generated textboxes in C# windows application. I have successfully read an xml file and put its key and value fields as Label and TextBox respectively. Now what I need is the user changes the values in one of the textBox and I need to get that value. The problem is I...
1
5299
by: Prabhash1213 | last post by:
Dear All, I want to some textboxes visible true and visible false in Java script. Please give solution for it. Thank you.
0
7276
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7182
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7408
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7142
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5714
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5110
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3267
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3259
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
488
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.