473,396 Members | 1,990 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Pre_Init for User Control is not firing in ASP.NET 2.0

Hi,

I'm using ASP.NET 2.0. I have code like:
protected void Page_PreInit(object sender, EventArgs e)
{
// do something
}

The Page_PreInit is not firing. Is it supposed to work for User Control? I
should not need to explicitly wire the event, do I? I don't for Page_Load
for example, and Page_Load works just fine.

Thanks,
Michael
Dec 30 '05 #1
2 3442
Controls don't have the PreInit event; only the page does.

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi,

I'm using ASP.NET 2.0. I have code like:
protected void Page_PreInit(object sender, EventArgs e)
{
// do something
}
The Page_PreInit is not firing. Is it supposed to work for User
Control? I should not need to explicitly wire the event, do I? I don't
for Page_Load for example, and Page_Load works just fine.

Thanks,
Michael

Dec 30 '05 #2
Thanks Brock.
"Brock Allen" <ba****@NOSPAMdevelop.com> wrote in message
news:b8**************************@msnews.microsoft .com...
Controls don't have the PreInit event; only the page does.

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi,

I'm using ASP.NET 2.0. I have code like:
protected void Page_PreInit(object sender, EventArgs e)
{
// do something
}
The Page_PreInit is not firing. Is it supposed to work for User
Control? I should not need to explicitly wire the event, do I? I don't
for Page_Load for example, and Page_Load works just fine.

Thanks,
Michael


Dec 30 '05 #3

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

Similar topics

0
by: JV | last post by:
I am having trouble with the following. Any help/insight is welcome: I have a User Control that contains multiple DropDownList controls (as well a others but I will start here). It is a control...
3
by: Tim Thomas | last post by:
Hi, I am very new to .NET and am in the process of building my first web application. I will briefly describe what i am trying to achieve: I have a system where suppliers register their...
1
by: Shourie | last post by:
I've noticed that none of the child controls events are firing for the first time from the dynamic user control. Here is the event cycle. 1) MainPage_load 2) User control1_Load user clicks a...
1
by: Earl Teigrob | last post by:
PROBLEM: When a user control is loaded into a PlaceHolder control more than once, the events do not fire on the first click of a control on the dynamically loaded user control. In other words, the...
1
by: Raed Sawalha | last post by:
I am trying to sort a DataGrid in a user control that is programatically loaded when a link button is clicked. UC1 is loaded onto Page1.aspx after clicking a link button. No problem, loads fine....
2
by: ~~~ .NET Ed ~~~ | last post by:
I have a problem (don't we all?). I have a web form with multiple modules, some of these modules have an ASP.NET (server run) button. OK, now I have UserControlX which has one such button (say...
3
by: Don | last post by:
I have a User Control called Menu that is used in another User Control called header. It seems the button clicked event in the first control (Menu) is not firing. If I click a button on the...
1
by: Ben Fidge | last post by:
I've got a User Control that renders site navigation from a database. For some reason, when using Output Caching, none of my LinkButtons fire their PostBack events. The declaration in the...
2
by: Mike | last post by:
protected void Page_PreInit(object sender, EventArgs e) { TextBox1.Text = TextBox1.GetType().ToString(); } In the Pre_Init event of the page, I can set the value of say a TextBox's Text...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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,...

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.