To add a Data Bind call

  1. Use the Object Inspector drop-down to select the WebForm (WebForm1 is the default).
  2. In Object Inspector, select the Events tab.
  3. Set the Load event to Page_Load.
  4. In Object Inspector, double-click Page_Load.

The code-behind designer appears, cursor in place between event handler brackets.

  1. Code the DataBind call:
  2. dataGrid1.DataBind();

Note: If you are using data aware controls, for instance from a third-party provider, you may not need to code the DataBind call.

The application compiles and the HTTP server displays a Web Form with the datagrid.

While presenting a minimum number of steps required to build a database project, the preceding procedure demonstrates the major components of the ASP.NET, ADO.NET, and BDP.NET architectures at work, including: providers, datasets, and adapters. The adapter connects to the physical data source via a provider, sending a command that will read data from the data source and populate a dataset. Once populated, a datagrid displays data from the dataset.

Once created, use other BDP.NET designers to modify and maintain the components of your project.

Project Management Made Easy

Project Management Made Easy

What you need to know about… Project Management Made Easy! Project management consists of more than just a large building project and can encompass small projects as well. No matter what the size of your project, you need to have some sort of project management. How you manage your project has everything to do with its outcome.

Get My Free Ebook


Post a comment