Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / January 2008

Tip: Looking for answers? Try searching our database.

User Control PageLoad even not firing

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Phil Johnson - 31 Jan 2008 10:43 GMT
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,
Signature

Regards,

Phillip Johnson (MCSD For .NET)
PJ Software Development
www.pjsoftwaredevelopment.com

Michael Nemtsev [MVP] - 31 Jan 2008 11:20 GMT
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

PJ> Hello,
PJ>
PJ> I have a page that contains a user control that is nested within
PJ> other user controls... the nesting is quite deep, not sure exactly
PJ> how ddep but there is a control inside a control inside a ... etc.
PJ>
PJ> One of the user controls has a button click that tries to get a
PJ> reference to the problematic user control nested inside of it but it
PJ> throws an exception saying the user control does not exist, but this
PJ> problem only happens on a postback, on first load everything is
PJ> fine.
PJ>
PJ> When I put a breakpoint in the pageload event handlers of all the
PJ> user controls and the page, on first load they all fire, but on a
PJ> postback the pageload of the problematic user control does not fire.
PJ>
PJ> Anybody got any ideas?
PJ>
PJ> Thanks in advance,
PJ>
PJ> Phillip Johnson (MCSD For .NET)
PJ> PJ Software Development
PJ> www.pjsoftwaredevelopment.com
Phil Johnson - 31 Jan 2008 11:47 GMT
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.

Signature

Regards,

Phillip Johnson (MCSD For .NET)
PJ Software Development
www.pjsoftwaredevelopment.com

> Hello Phil,
>
[quoted text clipped - 30 lines]
> PJ> PJ Software Development
> PJ> www.pjsoftwaredevelopment.com

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.