System.Web.UI.Control.FindControl C# (CSharp) Method

FindControl() private method

private FindControl ( string id ) : Control
id string
return Control
		public virtual Control FindControl (string id)
		{
			return FindControl (id, 0);
		}

Same methods

Control::FindControl ( string id, int pathOffset ) : Control

Usage Example

Example #1
3
        public override Control AddTo(Control container)
        {
            // If the current container doesn't already contain a TabControl, create one now.
            CustomTabPanel tabControl = container.FindControl("TabControl") as CustomTabPanel;
            if (tabControl == null)
            {
                tabControl = new CustomTabPanel { ID = "TabControl" };
                if (container is ContentPanel)
                    ((ContentPanel) container).ContentControls.Add(tabControl);
                else
                    container.Controls.Add(tabControl);
            }

            Panel tabItem = new Panel
            {
                AutoScroll = true,
                AutoHeight = true,
                AutoWidth = true,
                ID = "tabItem" + Name,
                Title = Title,
                BodyStyle = "padding:5px"
            };
            tabControl.Items.Add(tabItem);
            return tabItem;
        }
All Usage Examples Of System.Web.UI.Control::FindControl