Hello, friends,
In a .aspx page, we have a web user control.
In both control and .aspx page, we have Page_Load event.
My question is: Which event will raised first when rendering this page to
clients? Can I change web user control's properties in .aspx Page_Load event
so that control's Page_Load can use the new property values I just assigned?
Thanks. 3 1343
It's recursing starting from the page to controls, to child controls.
Karl
--
MY ASP.Net tutorials http://www.openmymind.net/
"Andrew" <An****@discuss ions.microsoft. com> wrote in message
news:3C******** *************** ***********@mic rosoft.com... Hello, friends,
In a .aspx page, we have a web user control.
In both control and .aspx page, we have Page_Load event.
My question is: Which event will raised first when rendering this page to clients? Can I change web user control's properties in .aspx Page_Load event so that control's Page_Load can use the new property values I just assigned?
Thanks.
Thank you, Karl,
In .aspx html, I have:
<uc1:MainMenu id="MainMenu1" name="MainMenu1 " runat="server"> </uc1:MainMenu>
But, in Page_Load event (c#), I could not see this.MainMenu1. I thought I
should be able to see this web user control I dropped on this page??
Any reference paper, or sample source code? Thanks a lot.
"Karl Seguin [MVP]" wrote: It's recursing starting from the page to controls, to child controls.
Karl
-- MY ASP.Net tutorials http://www.openmymind.net/
"Andrew" <An****@discuss ions.microsoft. com> wrote in message news:3C******** *************** ***********@mic rosoft.com... Hello, friends,
In a .aspx page, we have a web user control.
In both control and .aspx page, we have Page_Load event.
My question is: Which event will raised first when rendering this page to clients? Can I change web user control's properties in .aspx Page_Load event so that control's Page_Load can use the new property values I just assigned?
Thanks.
It's possible that the decleration for the control simply didn't make it
into codebehind. Sometimes it's automatically generated, sometimes it isn't.
Expand the auto-generated region in your codebehind, and see if you have a
MainMenu1 variable defined, ala:
protected MainMenuMainMen u1;
if it isn't htere, simply add it.
Karl
--
MY ASP.Net tutorials http://www.openmymind.net/
"Andrew" <An****@discuss ions.microsoft. com> wrote in message
news:3B******** *************** ***********@mic rosoft.com... Thank you, Karl,
In .aspx html, I have:
<uc1:MainMenu id="MainMenu1" name="MainMenu1 " runat="server"> </uc1:MainMenu>
But, in Page_Load event (c#), I could not see this.MainMenu1. I thought I should be able to see this web user control I dropped on this page??
Any reference paper, or sample source code? Thanks a lot. "Karl Seguin [MVP]" wrote:
It's recursing starting from the page to controls, to child controls.
Karl
-- MY ASP.Net tutorials http://www.openmymind.net/
"Andrew" <An****@discuss ions.microsoft. com> wrote in message news:3C******** *************** ***********@mic rosoft.com... > Hello, friends, > > In a .aspx page, we have a web user control. > > In both control and .aspx page, we have Page_Load event. > > My question is: Which event will raised first when rendering this page > to > clients? Can I change web user control's properties in .aspx Page_Load > event > so that control's Page_Load can use the new property values I just > assigned? > > Thanks. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: James Lennon |
last post by:
Is there an event that is raised that occurrs after a
Windows form is displayed for the firt time?
The Load event occurrs before the form is displayed for
the first time I am looking for an event that is raised
after the form is displayed for the first time?
|
by: z. f. |
last post by:
Hi,
i have a class that is derived from System.Web.UI.Page, and this is the
class i use in my application as PageBase.
all other page classes are deriverd from my PageBase instead of the original
System.Web.UI.Page in order to have common checks in the page base.
i make securirty checks in the page base page_load event.
if the security fails, i can do whatever i want before the "real" / derived
page gets to be executed.
|
by: Studio P.M. |
last post by:
Dear colleagues,
I kindly ask the C# developers community to help me to REALLY understand
the Page_Load event, so to REALLY have it under control.
Reason for this question is that I cannot anymore accept passively the
behavior of the “Web Form Designer” automatically generated code because of
the fact that, in some circumstances (that I can reproduce at will), my code
is victim of a Page_Load multiple “firing”. In other words the...
|
by: Christian |
last post by:
hi,
what is the difference between the Page_Load() and OnLoad() event handlers.
do they originate from a different point ?
|
by: Rebecca |
last post by:
I have a dynamically created command button on a .net page that adds 1 row to a sql server table when clicked. The page_load event load rows from that table for the user to view, but for some reason it is not loading the most recently added record when the page is reloaded from the command button click. When the page is initially loaded it does display all records. It is like it is executing the page_load method before the method to add the...
| |
by: Joe |
last post by:
I have a DataGrid with a templated column that displays ImageButtons. I need
to know if one of these buttons caused the postback or just another button
on the form. If one of these buttons caused the postback than I don't want
to do a DataBind otherwise I do.
I know __EVENTTARGET doesn't return this information. Is there anything else
that does?
Thanks,
Joe
|
by: Shawn |
last post by:
Hi.
I have a ToolBar with a couple of ToolBarButtons. On postback after
clicking on of the buttons Page_Load is called first then the
ToolBarButton's click event is called. Is there anyway for me to check in
Page_Load which of the buttons have been clicked?
Thanks,
Shawn
|
by: JohnR |
last post by:
In it's simplest form, assume that I have created a usercontrol,
WSToolBarButton that contains a button. I would like to eventually create
copies of WSToolBarButton dynamically at run time based on some
initialization information obtained elsewhere. Basically, I'm going to
create my own dynamic toolbar where the toolbarbuttons can change. I'm not
using the VB toolbar because of limitations in changing things like
backcolor (I can't get...
|
by: rockdale |
last post by:
Hi,
I have a masterpage and on the page_load event I Populate my mainmenu
from database.
I the page_load event of my content, I am trying to programmly select
the menuitem that represent current content page, but as you know, the
page_load event is fired backward, the content page_load fires first
then followed by the master page page_load, I could not get the
mainmenu in the content page( have not been initialized since
|
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, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look !
Part I. Meaning of...
|
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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 projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |