web 2.0

ASP.NET(vb.net) & ListView Control

ASP.NET(vb.net) & ListView Control
The ListView is represents a Windows list view control, which displays a collection of items that can be displayed using one of four different views. This example code can to Applied .NET  Technology for ASP.NET 3.5 or later.

ASP.NET(vb.net) & ListView Control

ListView Icon Control

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

ASP.NET(vb.net) & ListView Control

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

ASP.NET(vb.net) & ListView Control

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

ASP.NET(vb.net) & ListView Control

Choose a Database Path of Microsoft Access data file:

ASP.NET(vb.net) & ListView Control

Configure the Select Statement.

ASP.NET(vb.net) & ListView Control

Test Query and Click Finish

LayoutTemplate and ItemTemplate

<LayoutTemplate>
<table>
<tr>
<td>
<table id="Table1" runat="server" border="1">
<tr>
<th id="Th1" runat="server">
CustomerID</th>
<th id="Th2" runat="server">
Name</th>
<th id="Th3" runat="server">
Email</th>
<th id="Th4" runat="server">
CountryCode</th>
<th id="Th5" runat="server">
Budget</th>
<th id="Th6" runat="server">
Used</th>
</tr>
<tr ID="itemPlaceholder" runat="server">
</tr>
</table>
</td>
</tr>
</table>
</LayoutTemplate>

<ItemTemplate>
<tr>
<td>
<asp:Label ID="lblCustomerID" runat="server" Text='<%# Eval("CustomerID") %>' />
</td>
<td>
<asp:Label ID="lblName" runat="server" Text='<%# Eval("Name") %>' />
</td>
<td>
<asp:Label ID="lblEmail" runat="server" Text='<%# Eval("Email") %>' />
</td>
<td>
<asp:Label ID="lblCountryCode" runat="server" Text='<%# Eval("CountryCode") %>' />
</td>
<td>
<asp:Label ID="lblBudget" runat="server" Text='<%# Eval("Budget") %>' />
</td>
<td>
<asp:Label ID="lblUsed" runat="server" Text='<%# Eval("Used") %>' />
</td>
</tr>
</ItemTemplate>

Screenshot
ASP.NET(vb.net) & ListView Control

ddddddddddddddddd

.
.
.

Download this script.
Download
.
.
.
Others related articles

ASP.NET(vb.net) & ListView - DataBind  & DataSource
ASP.NET(vb.net) & ListView - SeparatorTemplate
ASP.NET(vb.net) & ListView - AlternatingItemTemplate
ASP.NET(vb.net) & ListView - DataBound
ASP.NET(vb.net) & ListView - XML
ASP.NET(vb.net) & ListView - DataSet,DataTable,TableRow
ASP.NET(vb.net) & ListView - FindControl
ASP.NET(vb.net) & ListView - Visual Studio 2008,2010 (Fx 3.5,4.0)
ASP.NET(vb.net) & ListView - Microsoft Access (.mdb) - System.Data.OleDb
ASP.NET(vb.net) & ListView - SQL Server 2000,2005,2008 - System.Data.SqlClient
ASP.NET(vb.net) & ListView - MySQL Database - MySql.Data.MySqlClient
ASP.NET(vb.net) & ListView - 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.