Export (0) Print
Expand All
2 out of 11 rated this helpful - Rate this topic

DataBinder Class

Provides support for rapid application development (RAD) designers to generate and parse data-binding expression syntax. This class cannot be inherited.

Namespace: System.Web.UI
Assembly: System.Web (in system.web.dll)
public sealed class DataBinder
public final class DataBinder
public final class DataBinder
Not applicable.

You can use the overloaded static Eval method of this class in data-binding syntax in an ASP.NET Web page. This provides an easier syntax to work with than standard data binding. However, because DataBinder.Eval provides automatic type conversion, it can result in slower performance.

For more information about ASP.NET data binding, expressions, and syntax, see ASP.NET Data Binding and Data-Binding Expression Syntax.

The following example uses the static GetPropertyValue method to populate the fields of a Repeater control using an ArrayList of Product objects. The Eval method could be applied with the same syntax, but it would not perform as quickly.

This example assumes the existence of a custom class which exposes a string Model property and a numeric UnitPrice property.

System.Object
  System.Web.UI.DataBinder
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.