- Access nested web user control elements
- public partial class ParentControl : UserControl
- {
- ...
- // Expose the whole child control
- public ChildControl MyChild
- {
- get { return this.theIdOfTheChildControl; }
- }
- ...
- // or expose specific properties
- public string MyChildText
- {
- get { return this.theIdOfTheChildControl.Text; }
- set { this.theIdOfTheChildControl.Text = value; }
- }
- }