Docs-->. Net-->api Reference-->system.? Web.? Ui-->control-->methods-->find? Control

Source: Internet
Author: User

https://docs.microsoft.com/en-us/dotnet/api/system.web.ui.control.findcontrol?view=netframework-4.7

FindControl (String)

Searches the current naming container for a server control with the specified id parameter.

 Public Virtual System.Web.UI.Control FindControl (string ID);
Parameters
Id
String

The identifier for the control is found.

ReturnsControl

The specified control, or null if the specified control does not exist.

Remarks

Use FindControl to access a control from a function with a Code-behind page, to access a control, which is inside another cont Ainer, or in other circumstances where the target control was not a directly accessible to the caller.

This method would find a control only if the control was directly contained by the specified container; That's, the method does not search throughout a hierarchy of controls within controls.

For information what to find a control when the know its immediate closest container, see how to:access Server Co Ntrols by ID.

Docs-->. Net-->api Reference-->system.? Web.? Ui-->control-->methods-->find? Control

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.