473,403 Members | 2,338 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,403 software developers and data experts.

User Control PageLoad even not firing

Hello,

I have a page that contains a user control that is nested within other user
controls... the nesting is quite deep, not sure exactly how ddep but there is
a control inside a control inside a ... etc.

One of the user controls has a button click that tries to get a reference to
the problematic user control nested inside of it but it throws an exception
saying the user control does not exist, but this problem only happens on a
postback, on first load everything is fine.

When I put a breakpoint in the pageload event handlers of all the user
controls and the page, on first load they all fire, but on a postback the
pageload of the problematic user control does not fire.

Anybody got any ideas?

Thanks in advance,
--
Regards,

Phillip Johnson (MCSD For .NET)
PJ Software Development
www.pjsoftwaredevelopment.com
Jan 31 '08 #1
2 1961
Hello Phil,

any code samples demonstrating the problem?

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
PJHello,
PJ>
PJI have a page that contains a user control that is nested within
PJother user controls... the nesting is quite deep, not sure exactly
PJhow ddep but there is a control inside a control inside a ... etc.
PJ>
PJOne of the user controls has a button click that tries to get a
PJreference to the problematic user control nested inside of it but it
PJthrows an exception saying the user control does not exist, but this
PJproblem only happens on a postback, on first load everything is
PJfine.
PJ>
PJWhen I put a breakpoint in the pageload event handlers of all the
PJuser controls and the page, on first load they all fire, but on a
PJpostback the pageload of the problematic user control does not fire.
PJ>
PJAnybody got any ideas?
PJ>
PJThanks in advance,
PJ>
PJPhillip Johnson (MCSD For .NET)
PJPJ Software Development
PJwww.pjsoftwaredevelopment.com
Jan 31 '08 #2
Hi Michael,

Unfortunately not... Like I say there are a lot of nested controls and a lot
of code... it is going to be difficult to reproduce a small app with the same
behaviour.

I was hoping somebody else might have experienced the same behaviour and
resolved it.

--
Regards,

Phillip Johnson (MCSD For .NET)
PJ Software Development
www.pjsoftwaredevelopment.com
"Michael Nemtsev [MVP]" wrote:
Hello Phil,

any code samples demonstrating the problem?

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
PJHello,
PJ>
PJI have a page that contains a user control that is nested within
PJother user controls... the nesting is quite deep, not sure exactly
PJhow ddep but there is a control inside a control inside a ... etc.
PJ>
PJOne of the user controls has a button click that tries to get a
PJreference to the problematic user control nested inside of it but it
PJthrows an exception saying the user control does not exist, but this
PJproblem only happens on a postback, on first load everything is
PJfine.
PJ>
PJWhen I put a breakpoint in the pageload event handlers of all the
PJuser controls and the page, on first load they all fire, but on a
PJpostback the pageload of the problematic user control does not fire.
PJ>
PJAnybody got any ideas?
PJ>
PJThanks in advance,
PJ>
PJPhillip Johnson (MCSD For .NET)
PJPJ Software Development
PJwww.pjsoftwaredevelopment.com
Jan 31 '08 #3

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

Similar topics

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...
3
by: Philip Poole | last post by:
Hello everyone, Please help with this as it is driving me up the wall and it is urgent i finish this page, this is the first time I have used User Controls and I think I must have completly...
6
by: Steve Booth | last post by:
I have a web form with a button and a placeholder, the button adds a user control to the placeholder (and removes any existing controls). The user control contains a single button. I have done all...
0
by: jonelling | last post by:
I am having a problem where the page load event is not being fired for certain user controls that I load dynamically in placeholders. Here is what I'm doing in brief, with full test code supplied...
4
by: Wayne Wengert | last post by:
I have a form that has a cbo set to TabIndex 0 (it is the only item set to tabindex 0). On page Load if I step through the code that cbo LostFocus event fires after other initializations are...
1
by: Dood | last post by:
I have a page that has a tab control which toggles which user control is loaded into a placeholder. The user controls that are loaded into this place holder have other user controls in them, making...
2
by: edsuslen | last post by:
I am trying to migrate from asp to asp.net and having problem replacing include with user control. On every page we have include asp that have some common asp code that I need to run before the...
2
by: tshad | last post by:
In VS 2008, I have 2 pages, one aspx page and one ascx page. The PreRender event is not firing on the Contol page. The aspx page starts out: <%@ Page Language="VB" AutoEventWireup="true"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
0
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...
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
tracyyun
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...
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,...
0
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...

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.