web 2.0

ASP.NET(vb.net) & Repeater Control

ASP.NET(vb.net) & Repeater Control
The Repeater is a get data-bound list control that allows custom layout by repeating a specified template for each item displayed in the list. This example code can to Applied .NET  Technology for ASP.NET 1.0 or later.

ASP.NET(vb.net) & Repeater Control

Repeater Icon Control.

This a sample create Repeater and display the value from AccessDataSource.

ASP.NET(vb.net) & Repeater Control

Drag control Repeater to ASP.NET Web Form and Click Repeater Tasks -> Choose Data Source -> <New data source…>

ASP.NET(vb.net) & Repeater Control

Choose a Data Source Type : Select Access Database and Specify an ID for the data source.

ASP.NET(vb.net) & Repeater Control

Choose a Database Path of Microsoft Access data file:

ASP.NET(vb.net) & Repeater Control

Configure the Select Statement.

ASP.NET(vb.net) & Repeater Control

Test Query and Click Finish

Insert HeaderTemplate , ItemTemplate and FooterTemplate


<HeaderTemplate>
<table border="1">
<tr>
<th>CustomerID</th>
<th>Name</th>
<th>Email</th>
<th>CountryCode</th>
<th>Budget</th>
<th>Used</th>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr>
<td align="center"><%#Container.DataItem("CustomerID") %></td>
<td><%#Container.DataItem("Name") %></td>
<td><%#Container.DataItem("Email") %></td>
<td align="center"><%#Container.DataItem("CountryCode") %></td>
<td align="right"><%#Container.DataItem("Budget") %></td>
<td align="right"><%#Container.DataItem("Used") %></td>
</tr>

</ItemTemplate>
<FooterTemplate>
<!--
<tr>
<th>CustomerID</th>
<th>Name</th>
<th>Email</th>
<th>CountryCode</th>
<th>Budget</th>
<th>Used</th>
</tr>
-->
</table>
</FooterTemplate>

Screenshot

ASP.NET(vb.net) & Repeater Control

.
.
.

Download this script.
Download
.
.
.
Others related articles

ASP.NET(vb.net) & Repeater - DataBind  & DataSource
ASP.NET(vb.net) & Repeater - AlternatingItemTemplate
ASP.NET(vb.net) & Repeater - SeparatorTemplate
ASP.NET(vb.net) & Repeater - DataBound
ASP.NET(vb.net) & Repeater - DataSet,DataTable,TableRow
ASP.NET(vb.net) & Repeater - XML
ASP.NET(vb.net) & Repeater - FindControl
ASP.NET(vb.net) & Repeater - Visual Studio .NET 2003 (Fx 1.1)
ASP.NET(vb.net) & Repeater - Visual Studio 2005,2008,2010 (Fx 2.0,3.5,4.0)
ASP.NET(vb.net) & Repeater - Microsoft Access (.mdb) - System.Data.OleDb
ASP.NET(vb.net) & Repeater - SQL Server 2000,2005,2008 - System.Data.SqlClient
ASP.NET(vb.net) & Repeater - MySQL Database - MySql.Data.MySqlClient
ASP.NET(vb.net) & Repeater - Oracle Database - System.Data.OracleClient

1 Star2 Stars3 Stars4 Stars5 Stars6 Stars7 Stars8 Stars9 Stars10 Stars (1 votes, average: 1.00 out of 10)
Loading ... Loading ...

Leave a Reply

You must be logged in to post a comment.