BasicDataList |
The BasicDataList control is inherited from the standard ASP.NET DataList control. It automatically ensures data binding. You can use the common ASP.NET DataList tags to set up BasicDataList style and behavior - please see the .NET Framework documentation for details.
BasicDataList can be used with any bindable data source - it doesn't use Kentico CMS database or API.
Unlike BasicRepeater, BasicDataList allows you to display data in several columns.
Please note: If you want to display data from Kentico CMS, please use the CMSDataList control that provides a more convenient way.
Inherits: DataList (ASP.NET control)
Properties
Design
The design can be modified in the same way as for the standard DataList control.
Example
This example will show you how to read a list of products (from the sample Corporate Site) and display it using the BasicDataList control.
[C#], [VB.NET]
What you did
You have defined a template for one product displayed by the DataList control. The control dynamically replaces the <%# ... %> tags with values of the current record. This is repeated for each record in the SQL query result. The ResolveUrl("~") command generates the path to the root of your web project.
[C#]
[VB.NET]
What you did You have included namespaces we will use..
[C#]
[VB.NET]
What you did You have added code that reads data from the database and provides them to the BasicDataList control.
|