Thanks F�bio. Is this to prevent visual studio from resetting them to 
protected everytime you use the designer or to follow good programming 
practices? I hate making properties because it is time consuming.

Yannick
----- Original Message ----- 
From: "F�bio Rosato" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, April 26, 2005 1:52 PM
Subject: Re: [AspNetAnyQuestionIsOk] Findcontrol or public accessors



Hi Yannick,

In class of the usercontrol create a property (public method)
accessing a property "Text" of the textbox.

[]'s
F�bio Rosato

2005/4/25, Yannick Smits <[EMAIL PROTECTED]>:
>
> From the page code I want to access a textbox value of a user contorl on 
> that page. what is the recommended approach:
> - ((TextBox)Usercontrol1.FindControl("textbox1")).Text or
> - make textbox1 public in user control and access using 
> Usercontrol1.textbox1.Text?
>
> Thanks,
> Yannick



Yahoo! Groups Links










 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to