Consuming and Creating Server Controls (20 percent)
- Implement data-bound controls
- DataGrid
- DataList
- DataPager
- DetailsView
- FormView
- GridView
- ListView
- Repeater
- TreeView
- Load user controls dynamically
- PlaceHolder control
- LoadControl Method
- @Reference
- ControlCollection
- Control.Controls
- ASP.NET Page Life cycle
- Dynamic web server controls and view state
- Create a user control progamatically
- Create and consume custom controls
- User Controls Overview
- @Register
- @Control
- Including user controls
- Creating Templated controls
- Walkthrough: Creating reusable elements with user controls
- Implement client-side validation and server-side validation
- CompareValidator
- CustomValidator
- RangeValidator
- RegularExpressionValidator
- RequiredFieldValidator
- Types of validation
- Validation groups
- Client-side validation
- Page.IsValid property
- OnServerValidate method
- Walkthrough: Validating user input
- Consume standard controls
- Button
- CheckBox
- CheckBoxList
- DropDownList
- FileUpload
- HyperLink
- Image
- ImageButton
- LinkButton
- ListBox
- MultiView
- RadioButton
- RadioButtonList
- TextBox
- Wizard
- JavaScript Object Notation (JSON), pronounced “Jason”, is a lightweight computer data interchange format. It is a text-based, human-readable format for representing simple data structures and associative arrays (called objects).
- The Bind method is normally used with input controls such as the TextBox control rendered by a GridView row in edit mode. As soon as the data-bound control constructs these input controls as element of its own rendering, it can get the input values.
- The SelectedIndex property of the DropDownList class is used to get or set the index of the selected item in the DropDownList control.
- The TreeView is a data-bound control that displays hierarchical data such as a table of contents or a file directory in a tree-like structure format.
- It is important to provide an id because it gives identification for the data value entered into the field by the user.
- The OnItemDataBound method of the DataGrid control is used to raise the ItemDataBound event that occurs after a data item is bound to the control.
- The AutoGenerateColumns property is used to get or set a value that indicates whether or not the BoundColumns object are automatically created and displayed in the DataGrid control for each field in a data source.
- The SqlDataReader class avoids creating unnecessary objects or making unnecessary copies of data. Hence, it provides optimal performance.
- The public DropDownList List; statement will make a List available for Page.aspx. Public variables and objects can be accessed from all other procedures and functions in all the modules in the same project.
- The EditCommand event of the DataGrid control occurs when users click the Edit button for a DataGrid item.
- The EditItemIndex property of the DataGrid control specifies the index of an item in the DataGrid control to edit. It is used to programmatically control which item is being edited.
- The args.Item.ItemIndex statement specifies the index of the selected item in the DataGrid control.
- The FormView control displays a single data record from a data source in a table. It displays only user-defined templates instead of row fields.
- The Init event is raised after a control is initialized. For a dynamically added user control to take part in post back data processing and validation, you must load the control during the Init event.
- Web server controls are used for advanced functionality and a more consistent programming model than HTML server controls.
- An ASP.NET application that is configured receives the request for the image from the Web browser and generates the image for each Web request.
- The INamingContainer interface is used to identify a container control that generates a new ID namespace inside a Page object’s control hierarchy. It is a simple marker interface.
- A RegularExpressionValidator control is used to check whether or not the value entered into a form field matches the pattern specified by a regular expression.
- The InitialValue property of a RequiredFieldValidator control is used to specify the initial value of the input control that is associated with the RequiredFieldValidator control.
- The ClientValidationFunction property of the CustomValidator class specifies the name of the custom client-side script function used for validation.
- The ServerValidate event for a CustomValidator control is raised when validation is performed on the server.
- A user can display all the validation error messages on a Web page in a message box by setting the ShowMessageBox property of the ValidationSummary control to True. If the user does not want the validation summary to be displayed on the Web page, the ValidationSummary property of the ValidationSummary control should be set to False.
- The RequiredFieldValidator validation control is used to check whether an input control contains a value. It is generally used to validate a TextBox control.
- The validation error message is displayed on a Web page in a message box by setting the ShowMessageBox property of the ValidationSummary control to true. By setting the ShowSummary property of the ValidationSummary control to false, the validation summary will not be displayed on the Web page.
- A Dynamic layout of a Web page can potentially change the layout of the page when an error message appears on it.
- The FileUpload class is used to display a TextBox control and a Browse Button that allows a user to select a file to upload to the Web server. The user provides the file to upload by entering the full path of the file on the local computer (for e.g. C:\MyFiles\CommonFiles\Test.txt) in the TextBox.
- The HttpRequest.Params collection contains all HTML form fields that are rendered by a page.
- The CreateUserWizard control is a login control that collects user information such as a user name, a password, an e-mail address, etc. This information can also be used for user authentication and for recovery of users’ passwords. The CreateUserWizard control also creates a new user account and adds the account to the ASP.NET membership system.
- The Page.PreviousPage property is used to get the page that transferred control to the current page. The FindControl method is used to search the current naming container for the specified server control.
- The PassThrough property renders the text as it is. It includes HTML markup and script.
- Several RadioButton controls on a Web form do not automatically interact with each other. In order to let several RadioButtons on a Web form interact with each other, they must be logically placed in a group by using the GroupName property of each control.
Recent Comments