Web Form Data Entry into SQL Database

Hello all,

I have a web application that I need to add data to a table in the sql 2005 server database.
I need to have the user use a drop down list to insert data.  The drop down list will have lists of items that I want the user to select for a record.  The drop down list box will have about 12 items that the user can select for a record.

The item selected by the user from this list will be inserted as a new record is made to the database.  Do any of you have any sample coding that will insert the drop down item into the database as a record is entered.  

The drop down list will be types of account.  The types of account will be stored in aan account table.  The drop down list will be named ddlAccount.   There will be another table called Representative and a drop down list will be called ddlRepresentative.  These two fields called Account and Representative will be added as one record into another main table called main.  The main tablle will have an ID that will automtaically increment as a new record is added to the database.

Do any of you have some sample coding to show me how to set this up with the two drop down boxes with an ID field where the user adda a record and inserts an account and representative from the drop down lists and the new record is then added to the database.

I need coding on how to insert new records, update records, and delete records from the sql database.  I need a grid viewto show all of the records that have been added to the Main table.
The grid view should be based on the main table.  As the user clicks the forward arrow I want the records to show one by one in the gridview as the forward arrow is clicked.

Record Number one for example being ID #1 with Accounts Receivable Account, and John Doe as Representatiove should show as #1 in the Gridview.

I hope I have made sens with this request.

Any help is appreciated.  

Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

ppittleConnect With a Mentor Commented:
Scott Mitchell has some excellent tutorials at asp.net that cover a range of topics for working with ASP.NET and SQL databases.  The tutorials provide plenty of screen shots and full code examples and have excellent coverage.  Take a look at this one in particular:

VB: http://www.asp.net/learn/data-access/tutorial-20-vb.aspx
C#: http://www.asp.net/learn/data-access/tutorial-20-cs.aspx

jjc9809Author Commented:
Thnaks for the links to the tutorials!
All Courses

From novice to tech pro — start learning today.