Posts

DataList Control in ASP.NET - Part 2

Image
Introduction In Part 1 of this article series we have discussed how to simply Display Data with DataList Control but now in this article we will discuss how to Display Data in Multiple Columns with DataList Control. Displaying Data in Multiple Columns with DataList Control It is very simple to render the contents of a DataList control into a multi-column table in which each data item occupies a separate table cell. Two properties modify the layout of the HTML table rendered by the DataList control: ·          RepeatColumns: The number of columns to display. ·          RepeatDirection: The direction to render the cells. Possible values are Horizontal and Vertical . Here is the example given below to display the contents of the Movies database table in a three-column layout. <% @ Page Language ="VB" %> <! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Tra...

DataList Control in ASP.NET - Part 3

Image
Introduction In Part 2 of this article series we have discussed how to Display Data in Multiple Columns with DataList Control but now in this article we will discuss how use Template Fields with DataList Control. Using Template Fields with DataList Control DataList Control supports all the same templates as the  Repeater  control: ·           ItemTemplate: It formats each item from the data source. ·           AlternatingItemTemplate: It formats every other item from the data source. ·           SeparatorTemplate: It formats between each item from the data source. ·           HeaderTemplate: It formats before all items from the data source. ·           FooterTemplate: It formats after all items from the data s...

Popular posts from this blog

Customize User's Profile in ASP.NET Identity System

Migrating database from ASP.NET Identity to ASP.NET Core Identity