NET
Objectives In this session, you will learn to:
Implement server controls
Ver. 1.0
Slide 1 of 29
Ver. 1.0
Slide 2 of 29
Ver. 1.0
Slide 3 of 29
Ver. 1.0
Slide 4 of 29
Ver. 1.0
Slide 5 of 29
Ver. 1.0
Slide 6 of 29
Ver. 1.0
Slide 7 of 29
The following table lists some of the common HTML server controls with their description.
HTML Server Controls HtmlAnchor control HtmlInputText control HtmlInputCheckBox control HtmlInputRadioButton control HtmlSelect control Description Works as the HTML <a> tag but runs on the server. It is used to direct the user from one page to another. Works as the HTML <INPUT type="text"> tag but runs on the server. It is used to gather information from the user. Works as the HTML <INPUT type="checkbox"> tag but runs on the server. It is useful to implement questions that can have only two answers, such as yes/no or true/false Works as the HTML <INPUT type="radio"> tag but runs on the server. You can use the HtmlInputRadioButton control to implement multiple-choice questions, where a user can select only one option. Works as the HTML <select> element but it runs on the server. It is used to create a list box and when a user has to select an option from a list of options. Slide 8 of 29
Ver. 1.0
Ver. 1.0
Slide 9 of 29
Ver. 1.0
Slide 10 of 29
ASP.NET provides the following validation controls that can be attached to input controls to validate the values that are entered by the user:
RequiredFieldValidator control RegularExpressionValidator control CompareValidator control RangeValidator control ValidationSummary control CustomValidator control
Ver. 1.0
Slide 11 of 29
Ver. 1.0
Slide 12 of 29
Ver. 1.0
Slide 13 of 29
Ver. 1.0
Slide 14 of 29
Ver. 1.0
Slide 15 of 29
Ver. 1.0
Slide 16 of 29
Ver. 1.0
Slide 17 of 29
Ver. 1.0
Slide 18 of 29
Ver. 1.0
Slide 19 of 29
Ver. 1.0
Slide 20 of 29
Ver. 1.0
Slide 21 of 29
Ver. 1.0
Slide 22 of 29
Ver. 1.0
Slide 23 of 29
Slide 24 of 29
Ver. 1.0
Slide 25 of 29
Ver. 1.0
Slide 26 of 29
Ver. 1.0
Slide 27 of 29
An event is a message that contains details about the user action, such as the cause of the event and the control on which the event occurred. The two arguments passed by all events in ASP.NET are:
Sender object Event object
The two types of events in ASP.NET server control event model are:
Postback events Nonpostback events
Ver. 1.0
Slide 28 of 29
Ver. 1.0
Slide 29 of 29