ASP.NET Logo Back to WebMatrix Home

 
Build an End-to-End Application
Entering User Data
In this walkthrough, you will add data to the Users table in the Orders database.
  1. Edit the Users table. There are two ways to edit a database table in the ASP.NET Web Matrix development environment:

     
    1. Click the Edit button on the Data window toolbar.
    2. Double-click on the table name in the Data window tree view.


     

  2. You will see the Edit Table dialog box appear. The Edit Table dialog shows a data grid that contains table data. Modifications you make to data in the Edit Table data grid are made directly against the database.

     
  3. Add two new rows of data to the Users table.


    Note Press the Enter key or select a different row in the data grid to commit a new row to the database.

     

    Note The UserID column is configured to auto-increment (starting at 1 and incrementing by 1). The database automatically determines and assigns the next value for an auto-increment field when a new row is committed to the database. Auto-increment field values are read-only in the Edit Table dialog data grid and will have a negative value until the new row is added to the database.

     

    Note Click the Edit/View Table Design link at the bottom of the Edit Table dialog to view the table definition while in edit mode. You cannot edit a table definition if there is data in the table. 

    Add Rows To Users

  4. Click Close.

Next Step >>