Page 172 - DCAP312_WEB_TECHNOLOGIES_II
P. 172

Web Technologies-II



                   Notes         8.5 Data-Bound Controls

                                 ASP.NET provides a rich set of data-bound server controls. These controls are easy to use and
                                 provide a Rapid Application Development (RAD) Web development. You can categorize these
                                 controls in two groups: single-item data-bound control and multi-item data-bound controls.

                                 You use the single-item data-bound controls to display the value of a single item of a database
                                 table. These controls do not provide direct binding with the data source. The highlighted part
                                 of given table shows an item of a database table. You use the Text, Caption, or Value property
                                 of these controls to show the data a field.

                                                          Table 8.1: Data-bound Controls

                                                AMAR            234, G. Road           12398
                                                SUNIL             5443, NY             89433
                                                 AJAY              P. Rd               54323



                                 8.5.1 An Item
                                 We use the multi-item data bound controls to display the entire or a partial table. These controls
                                 provide direct binding to the data source. We use the Data Source property of these controls to
                                 bind a database table to these controls (Table 8.2).


                                                         Table 8.2: Multiple-item Controls

                                                AMAR            234, G. Road           12398
                                                SUNIL             5443, NY             89433
                                                 AJAY               P.RD               54323



                                 Some examples of multi-item data-bound controls are DataGrid, ListBox, DataList, DropDownList,
                                 and so on some of the data bound controls (See Figure 8.1).


                                                          Figure 8.1: Data-bound Control






















                                 In ASP.NET, you create these controls using a <asp:controlName> tag.

                                 describes some common data-bound server-side controls


        166                               LOVELY PROFESSIONAL UNIVERSITY
   167   168   169   170   171   172   173   174   175   176   177