A bit of information about a control ID
Uniqueness of a control object is secured via their IDs. Usually, the control ID consists of a GUID of the view instance, placed on the form, and a control ID. If the control is placed directly on the form, the first GUID is replaced with 00000000-0000-0000-0000-000000000000.
Example of a View control ID:
Example of a Form control ID:
However, for certain controls, like e.g. Text Area, additional suffixes are added.
Example of a Text Area ID:
I am trying to point out, that there is no generic way to get the control object. Therefore, below I am giving some cases, which are the most frequent.
Finding most of the controls
The first way is suitable for the controls, that have a name attribute in Html. These are the following controls:
- Data Label
- List Box
- Rich Text
- Text Box
The next approach is suitable for controls, that do not have the Name property in Html.
Check Box List & Radio Button List