O'Reilly logo

A Programmer's Guide to .NET by Alexei Fedorov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

13.1. Working with data in web forms applications

Data binding in web forms is supported by the very flexible declarative syntax that permits us to specify the source of data. Here is an example:

<%# CustomerID %> 

Such a declaration can be placed anywhere on a page and will be evaluated when the Page.DataBind() method is called. Note that this is similar to ASP’s:

<% =CustomerÏID %> 

but the difference here is when the declaration is evaluated – in ASP it will be evaluated when the page is processed.

In this chapter, we will discuss how to use the following data-bound ASP.NET controls:

  • Repeater;

  • DataList;

  • DataGrid;

as well as how to use data binding with other ASP.NET controls.

Repeater control

The Repeater control is the simplest data binding ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required