Understand Controls:-
Lesson Overview -->
*User Controls
*Web controls
*Server controls
*Validation controls
User Controls:-
User controls enable you to reuse code and common user interface (UI) components.
User controls have the following features:
A user control resides in a Web Form page.
A user control participates in the event life cycle for the Web Form.
A user control has its own page logic.
User controls are self-contained.
None of the methods and properties of the user control conflict with the methods or properties of the hosting page.
User controls can be used more than once in a hosting page without causing property and method conflicts.
User controls can be written in a different language from the main hosting page.
Web controls:-
Web controls serve as the base class that defines the methods, properties, and events common to all controls in the System.
Web.UI.WebControls namespace.
Web controls deliver content that renders in all commonly used browsers.
You can control the appearance and behavior of a Web server control by setting properties defined in this class.
For example, the background color and font color of a control are set by using the BackColor and FontColor properties, respectively.
Server Controls:-
ASP.NET Web server controls are objects on ASP.NET Web pages that run when the page is requested and that render markup to the browser.
Can be similar to familiar Hypertext Markup (HTML) elements, such as buttons and text boxes.
Other controls encompass complex behavior. Example: calendar controls and controls that you use to connect to data sources and display data.
Validation Controls:-
You enable validation of user input by adding validation controls to your page (for example, testing for valid dates or values within a range).
Validation controls perform input checking in server code.
Validation controls can be used with any controls that you put on an ASP.NET Web page, including both HTML and Web server controls.
Examples of validation controls:-
Regular expression validator
The RegularExpressionValidator control is used to ensure that an input value matches a specified pattern or for Email- id
Compare Validator
To compare the two input values
Range validator
Lesson Review:-
Explain the following controls
User controls
Web controls
Server controls
Validation controls
Lesson Overview -->
*User Controls
*Web controls
*Server controls
*Validation controls
User Controls:-
User controls enable you to reuse code and common user interface (UI) components.
User controls have the following features:
A user control resides in a Web Form page.
A user control participates in the event life cycle for the Web Form.
A user control has its own page logic.
User controls are self-contained.
None of the methods and properties of the user control conflict with the methods or properties of the hosting page.
User controls can be used more than once in a hosting page without causing property and method conflicts.
User controls can be written in a different language from the main hosting page.
Web controls:-
Web controls serve as the base class that defines the methods, properties, and events common to all controls in the System.
Web.UI.WebControls namespace.
Web controls deliver content that renders in all commonly used browsers.
You can control the appearance and behavior of a Web server control by setting properties defined in this class.
For example, the background color and font color of a control are set by using the BackColor and FontColor properties, respectively.
Server Controls:-
ASP.NET Web server controls are objects on ASP.NET Web pages that run when the page is requested and that render markup to the browser.
Can be similar to familiar Hypertext Markup (HTML) elements, such as buttons and text boxes.
Other controls encompass complex behavior. Example: calendar controls and controls that you use to connect to data sources and display data.
Validation Controls:-
You enable validation of user input by adding validation controls to your page (for example, testing for valid dates or values within a range).
Validation controls perform input checking in server code.
Validation controls can be used with any controls that you put on an ASP.NET Web page, including both HTML and Web server controls.
Examples of validation controls:-
Regular expression validator
The RegularExpressionValidator control is used to ensure that an input value matches a specified pattern or for Email- id
Compare Validator
To compare the two input values
Range validator
Lesson Review:-
Explain the following controls
User controls
Web controls
Server controls
Validation controls