User Control PageLoad even not firing

P

Phil Johnson

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
 
M

Michael Nemtsev [MVP]

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
 
P

Phil Johnson

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top