Controls You Can Use on Web Forms ASP.NET Data Controls DataList Control
By default, the DataList displays a single column in which the contents are rendered in a top to bottom sequence.
The DataList, though, includes a RepeatColumns property that can be set to render the list items in any number of columns, and a RepeatDirection property that can be set to render the items in either vertical or horizontal order.
For instance, speciying three columns with repeat direction set to Horizontal renders a list of items shown below:
Vertical layout for the same items results in the following:
<asp:datalist id="myList" runat="server" repeatcolumns=3 repeatdirection="horizontal">
myList.RepeatDirection = RepeatDirection.Horizontal;
NOTE: When not specified, RepeatDirection defaults to Vertical.
Adding DataList Controls to a Web Forms Page Specifying List Layout in a DataList Control
© 2025 Reynald Nuñez and asp.net.ph. All rights reserved. If you have any question, comment or suggestion about this site, please send us a note