Skip Navigation LinksHome > Categories > Code from a Category

Using FormView control to edit/delete in ASP.NET & VB

User Name: codelecturer
Name: Mike Chauhan
Contact Me:
Home Page:
6 years of total IT experience including programming, application development, System Maintenance . 3 years of Experienced and expertise in .Net Framework VB, Visual Basic.Net, ASP.Net 2.0, 3.5 and AD... [More]
Viewed Times: 1977
Add Date: 11/21/2012
This article shows how we can use the FormView control to display data from a SQL database, and also allow adding, updating and deletion of this data. VB version.
This tutorial uses an example SQL database to show how the FormView control can display data for a user to edit, delete and also add to the database. Web.Config:

We add a DropDownList control to enable selection of records, and a FormView control to allow display and editing of the selected record. Each of these controls will have their own SqlDataSource:

When the user updates, deletes or adds a new record using the FormView control, we need to tell the ListBox to update it's list from the database.

The following code will also make the FormView appear once the user has selected an item from the drop-down list, and the initial item of (Select) in the list will disappear once the user has selected from the list.

Happy Programming!!!

Post a Comment

Name: (Optional)
Email: (Optional, you can get an email if somebody replys your comments)*
Email me if somebody respons my comment below:
Enter Text
as Below:
(case insensitive, if hard to read, click the "get a new one" button)
* Your email address will not be shared with any third parties for any reason.
** Maximum 1000 charactors.