NamingContainer null during page lifecycle

ts

Usenet Archive
Joined
Dec 23, 2000
Messages
1,586
Reaction score
0
I am declaratively settting value of custom control in aspx page:
<ctrl:MaskedEditTextBox ID="mskClient_FullPhone"
PropertyID="Client_FullPhone" runat="server" ReadOnly="true"
929-302-2093</ctrl:MaskedEditTextBox>

This control has a Text property and in side its setter, i am calling ensure childControls, which creates my child controls in which one of them tries to access NamingContainer but it and many other properties inherited from Control are all throwing null exceptions

When in life cycle is it OK to access this?

What options do i have when declaratively setting values like this?

thanks!!!
 

Teemu Keiski

Usenet Archive
Joined
Dec 19, 2002
Messages
2,276
Reaction score
0
Hi,

basically Load event is when page and controls should've been loaded. If you expect postback loading to happen also before, then it would be LoadComplete.
 

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

No members online now.

Forum statistics

Threads
548,042
Messages
3,104,223
Members
248,131
Latest member
Tonypshaw1

Latest Threads

Top