Hot-Link Menu in Right-Side Column

Shop Now at the Low Price Leader:
Every Day Low Prices at Wal-Mart

ASP.NET Web Programming

This Web Programming series assumes you are already familiar and proficient with the Visual Basic Tutorial, as no attempt will be made to explain the basic concepts already discussed. Familiarity with HTML, CSS and Javascript are also assumed. If you feel your are up to speed with background capabilities, you are welcome to continue on.

Begin a new Web project called Chopping Cart. Build the following table using the control ID's indicated in the following diagram:

Chopping Cart Order Form

Figure CC-1: Chopping Cart Order Form Template

How to create and use data sources

To connect to a database and work with its data, you can use an ASP.NET control called a data source. To illustrate how this works, the following topics show you how to create a data source that connects to a Microsoft Access database and bind it to a drop-down list. In this case ddlProducts

Create A Microsoft Access Data Source

ASP.NET provides several data source controls in the Data group of the Toolbox. The simplest of these is the AccessDataSource, which is designed to retrieve data from a Microsoft Access database file. To make things a little easier, double-click on the link below, and save in a convenient location. On my computers it is

Documents → Visual Studio 2008 → AccessDataFiles → Demo.mdb

Double Click to Download MS Access Demo File

Once you have the file saved, you need to tell Visual Studio where it is located. Right-Clicking on App_Data in solution explorer brings up:

MS Access Data File

Figure DB-2: Solution Explorer App_Data Add Existing Item

Buy from Centurion

Create An Access Data Source

After you have referenced the database file in App_Data, by telling Solution Explorer where the file is located, it is necessary to create an Access Data Source. The Data Source Control will not display while the web page is run, but it still should be placed in close proximity to the web page control that will bind to Access Data Source. Open the Data Group of the Visual Studio Toolbox. Drag the Data Source Control onto the page next to the ddlProducts Drop Down List:

VB.NET ASPX Style Configue Data Source Control

Figure CC-3: Configure Data Source Control

Help Support Mr. Centurion - Donate or Visit any Sponsor

No Purchase Necessary.

Help us keep this site operational by making a donation. Any amount is greatly appreciated. OR, if you visit our sponsor, they will make a donation for you, just for visiting.

Thank you

Selecting Configure Data Source on the Configure Smart Tag brings up the following Select Database dialog box:

Visual Studio Choose Database Dialog Box

Figure CC-4: Visual Studio Choose Access Database Dialog Box

Excellent Tech Support - Centurion Approved

Selecting the Browse button will bring up the following dialog box:

Select Microsoft Access Database

Figure CC-5: Select Microsoft Access Database

Select App_Data which will display the contents of the folder on the right hand side window. In this case Demo.mdb is displayed. Double-Clicking on Demo.mdb will bring up the following dialog box:

Microsoft Access Database Selected

CC-6: Microsoft Access Database Selected

In order to continue with this guide, and continue the discussion on Binding a control to Microsoft Access Database: Press the Button below:


Visual Basic

Introduction to VB.NET

.NET Framework

VS2008 IDE

How VB is Compiled

Start Visual Studio

Windows Form App

Save Your Work

VB OOP Programming

Visual Basic Code

Exit Code

Button Event Code

Coding Recommendations


Error List Window

Comment Syntax

Help Window

Language Essentianl

Built-In Data Types

Declare Variables

Declare Constants

Code Arithmetic Expressions

Assignment Statements

Operator Precedence

Type Casting

Math Class

String Declaration

Conversion Functions

Conversion Methods

Formatting Functions

String Formatting

Variable Scope


Nullable Types

Loop Constructs

For Next Loop

Do While Loop

Do Until Loop



Exit Do | Exit For


Nested Loops


Array Declaration

Rnd( ) Function

Listbox Control


Parallel Arrays

Key Event Args

Dynamic Arrays

Redimension Array

Set Breakpoint

Start Debugger

ReDim Preserve

MultiDimensional Arrays

DataGridView Control

Length and Sort Methods


Pad Right

Split Method

IsNumeric Function

Multiform Projects

Add Form To Project

Form Object Methods

Form Show Method

ShowDialog Method

Form Close Method

Form Accept Button

Multiform Project Example

ASP.NET Web Programming

Create Data Source

Configure Access Data Source

Add Product Class

Extract Local Database Data

Order PageLoad VB Code

Add New Web Page

Set Start Page

Display Cart Aspx Code

Display Cart Design View

Sorted List Definition

VB.NET Session State

Create CartItem Class

GetCartContents Function

Add To Cart Event Handler

Remove Cart Item Event

Clear Cart Event Handler

Can't open VisitorHistory.txt for reading