Chapter 6. Editing Access Data on the Web

There are a lot of reasons why you might want to add or edit data on a web page. The example you’ll go through in this chapter isn’t really something that you would do in a real-world situation, but I want to introduce you to a couple of concepts that you’ll find helpful if you need to interact with data through a web browser in the future.

It is worth noting that there are some great starter websites that you can build with Webmatrix. Currently, you can get Webmatrix on the Microsoft website, and from there you can install a prebuilt template to perform quick web development. Also, if you want to perform website functions like having a login, or if you want to use the MVC (model – view – controller) design pattern, you can use the preinstalled templates in Visual Studio. That said, it is still helpful for you to understand how to build a simple web page on your own.

In this example, you will begin with a blank ASP.NET website, as shown in Figure 6-1. I’ve called my website Chapter6. Note that you can do this from File→New→Web Site. If you want to build an MVC site, use File→New→Project and pick a Web project.

Setting up an empty website
Figure 6-1. Setting up an empty website

When you create this website, the only file in the website is Web.config. This means that you will need to add a Web Forms item to the website. To do this, go to Website→Add New Item and you will see ...

Get C# Database Basics now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.