User Controls

N

nova_jsh01

I've made a custom user control and want to access its properties during the Page_Load event. Does anybody know how do I access the instantated user control designed into the page I'm loading

Any help would be apreciated.
 
R

Raja Ravipati

Jsh

1.You can mark your controls in the User control as public instead of protected
2.You can have public properties for each controls in the User Control which return the protected control
public TextBox myTextBo

get{return _TextBox;


Hope this helps.Any problems E-mail me

----- nova_jsh01 wrote: ----

I've made a custom user control and want to access its properties during the Page_Load event. Does anybody know how do I access the instantated user control designed into the page I'm loading

Any help would be apreciated.
 
R

Raja Ravipati

In case you cant see the contol declaration as a private or protected property in the code behind, you have to add it manually b'cos visual studio doesn't add them automatically to the code behile file.
 

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
474,266
Messages
2,571,082
Members
48,772
Latest member
Backspace Studios

Latest Threads

Top