Net-informations.com

Repeater with HTML Table

The ASP.NET Repeater is a basic container control that allows you to create custom lists from any data available to the page. It render HTML to display the contents of a list or data source to which they are bound.

repeater-table

We can integrate a Repeater control with HTML Table. We should start a HTML table tag in the Header template and end the HTML table tag in the Footer template.

The following program also display an image inside the Repeater control. In order o display an image we are retrieving the image path from database values and embeded in the asp Image tag.

The above code retrieve the image path value from the website_logo database field. The following ASP.NET program retrieves the values from an XML file and display in the web page. The XML database file has two fields website_logo and website_name. The website_logo field contain the path of logo image and website_name contain the websites name.

VB.Net

C#

Copy and paste the following XML content to a notepad and save it as c:\websites.xml , or Download websites.xml from here and save it to c:\websites.xml.

Default.aspx



Click the following links to see full source code

C# Source Code
VB.NET Source Code
default.aspx.cs
default.aspx.vb





net-informations.com (C) 2019    Founded by raps mk
All Rights Reserved. All other trademarks are property of their respective owners.
SiteMap  | Terms  | About