Temption control

zhaozj2021-02-16  84

Temption control

1. Template is part of the page syntax, which can include server controls with static HTML and other text text.

2. Template controls provide important custom capabilities, commonly referred to as an appearance control (Lookless Controls) because it does not generate a predetermined user interface.

3. The style allows us to customize the visual appearance of the UI, and the template allows us to customize the contents of the generated UI.

4. Page Resolution parsing text within the Template tab, and generates a parsing tree to represent the contents of the template, just like parsing the entire page.

5. The parser uses an instance of the Itemplate type with parsing the tree (consisting of System.Web.UI.ControlBuilder object).

6. This itemplate instance can create a control level indicating the template content in a given container control.

The definition of the Itemplate interface: public interface itemplate {void instantiatein (control container);}.

Description of instantiatein methods:

A.Instantiatenin method instantiates the element of the template as a child control of the template container.

B. When implemented by a class, the Control object to which the child control and the template is defined. The subtover is then defined in the Inner Template.

.

7. The parser assigns the itemplate instance to the corresponding ITMPlate property of the control. When constructed the control level, the control can call the template multiple times, and create a copy of the control tree represented by the template each time the template is created.

8. Templates are usually used in the environment of the data binding control.

转载请注明原文地址:https://www.9cbs.com/read-21359.html

New Post(0)