web 2.0

ASP.NET(vb.net) AccessDataSource & DataFile

ASP.NET(vb.net) AccessDataSource & DataFile Example code how to use ASP.NET bind data from AccessDataSource  & DataFile

ShotDev Focus:
- ASP.NET(vb.net) AccessDataSource & DataFile

Example

AspNetAccessDataSource.aspx


<%@ Page Language="VB" %>
<html>
<head>
<title>ShotDev.Com Tutorial</title>
</head>
<body>
<form id="form1" runat="server">
<asp:GridView id="myGridView" runat="server" AutoGenerateColumns="False"
DataKeyNames="CustomerID" DataSourceid="myDSource" AllowSorting="True">
<Columns>
<asp:BoundField DataField="CustomerID" HeaderText="CustomerID" ReadOnly="True" SortExpression="CustomerID" />
<asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
<asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" />
<asp:BoundField DataField="CountryCode" HeaderText="CountryCode" SortExpression="CountryCode" />
<asp:BoundField DataField="Budget" HeaderText="Budget" SortExpression="Budget" />
<asp:BoundField DataField="Used" HeaderText="Used" SortExpression="Used" />
</Columns>
</asp:GridView>
<asp:AccessDataSource id="myDSource" runat="server"
DataFile="~/database/mydatabase.mdb" SelectCommand="SELECT * FROM [customer]">
</asp:AccessDataSource>
</form>
</body>
</html>

Create a asp.net file and save to path root-path/dotnet/

Run
http://localhost/dotnet/AspNetAccessDataSource.aspx

Screenshot

ASP.NET(vb.net) AccessDataSource & DataFile
.
.
.

Download this script.
Download

1 Star2 Stars3 Stars4 Stars5 Stars6 Stars7 Stars8 Stars9 Stars10 Stars (No Ratings Yet)
Loading ... Loading ...

Leave a Reply

You must be logged in to post a comment.