RAD Studio for Microsoft .NET |  |

CodeGear DB Web Controls Overview
DB Web Controls Architecture | Data-Aware Components Advantages | Supported Data Access Components | DB Web Controls Namespace | ASP.NET Application Deployment with DB Web Controls | See Also
Collapse All

Note: DB Web Controls (Borland.Data.Web namespace) are being deprecated in 2007. You should use standard Web controls instead.
CodeGear DB Web Controls simplify database development tasks in combination with BDP.NET and .NET Framework data access components. DB Web Controls are data-aware controls that provide advanced functionality, including data-aware grid, navigator, calendar, combobox, and other popular components.

This section introduces:

- DB Web Controls Architecture
- Data-aware Components Advantages
- Supported Data Access Components
- DB Web Controls Namespace
- ASP.NET Application Deployment with DB Web Controls

DB Web Controls Architecture

DB Web Controls are a set of visual and non-visual components that speed up the creation of ASP.NET applications by providing drag-and-drop capabilities along with a powerful data source discovery mechanism. For the most part, DB Web Controls are common GUI web controls for ASP.NET applications. The connector control, the DBWebDataSource control, acts as a data-aware connector between the visual controls and the underlying data source. In other words, the DBWebDataSource control acts as a conduit for the data that is stored in a data source and the controls that display that data on your ASP.NET form. The DBWebDataSource control can reference both .NET Framework ADO.NET and BDP.NET components. For example, the in-memory DataSet that is generated by an ADO.NET adapter (such as the SQLDataAdapter) or by one of the BDP.NET adapters (such as the BDPDataAdapter). Additionally, you can use the DBWebDataSource to link to other types of data source providers, such as text files, arrays, or collections.

Data-Aware Components Advantages

Typically, when you create an ASP.NET application that features controls that expose data from an underlying data source, such as a database, you need to manually configure the binding between the data source and the controls. This means figuring out the syntax and parameters for each control that must be bound to the data source.

The major advantage of using DB Web Controls is that once you have connected one DBWebDataSource control to your data source, all of the DB Web Controls on your ASP.NET page that reference the DBWebDataSource automatically bind to the underlying data source. You do not need to add any code to accomplish the data binding.

DB Web Controls provide the following advantages over standard web controls:

- Eliminates a need to call the WebControl.DataBind method. Normally, each ASP.NET control on the web form requires that you add this call in the Page_Load routine or the control will not display data at runtime.
- Provides a designtime view of the data.
- Posts changes back to the DataSet automatically. Typically, ASP.NET controls require code to post back changes.
- Maintains current row position.
- Manages change and row state automatically. This means that clients from different machines can operate independently, without regard to the server-side state.

In addition to these general advantages, DB Web Controls provide the following specific advantages:

- The DBWebDataSource maintains an ordered list of changes so that the user can undo changes in the order in which they were made.
- The DBWebNavigator control provides navigation capabilities for grids, multiple text controls, and can be extended to standard web controls.
- The DBWebDataGrid provides built-in capabilities for paging with numbers and icons, for adding Edit and Delete columns, and other advanced capabilities. In other words, you no longer need to code these features into your grid control.

Supported Data Access Components

DB Web Controls are compatible with .NET Framework ADO.NET and CodeGear BDP.NET data access components. Any data source that can be accessed by one of these providers can serve as the underlying data source for the DB Web Controls. In addition, many of the DB Web Controls, like many .NET web controls in general, can access other objects as data sources, such as arrays, collections, and files.

DB Web Controls Namespace

The namespace for DB Web Controls is Borland.Data.Web. By using reflection, you can learn much about the structure of the namespace and the controls. You can add the namespace to your project, then open it in the Code Editor. This opens the Reflection Editor and gives you a hierarchical view of all of the controls and their members.

Control | Description
DBWebDataSource | Acts as a bridge between the data source and the DBWeb controls.
DBWebAggregateControl | Text box control that displays aggregate values from a specified column.
DBWebCalendar | A calendar control.
DBWebCheckBox | A check box control.
DBWebDropDownList | A combo box control.
DBWebGrid | A data grid.
DBWebImage | An image control.
DBWebLabel | A label.
DBWebLabeledTextBox | A text box with an attached label.
DBWebListBox | A list box control.
DBWebMemo | A memo field control.
DBWebNavigationExtender | A non-visual component that allows you to define standard web control buttons as navigation controls.
DBWebNavigator | A navigation bar.
DBWebRadioButtonList | A radio button group.
DBWebSound | A sound control, which uses the default media player on your system.
DBWebTextBox | A text box.
DBWebVideo | A video control, which uses the default media player on your system.

ASP.NET Application Deployment with DB Web Controls

After creating an ASP.NET project with DB Web Controls, deploy your ASP.NET application as usual. No special considerations are required.

See Also

Data Providers for .NET

Building an Application with DB Web Controls

Building an ASP.NET Application

Using XML Files with DB Web Controls

Working with DataViews

WebDataLink Interfaces

Deploying ASP.NET Applications

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!