Use .NET to query your database in IISQLSRV
The following files show the C# code for an example of a web application that interfaces with the spam database from homework 1. The first example file shows you how to do an intro. page (and is not a part of the example). The second file is the code that is running the spam example.
- This file is the start page that has buttons to serve different functions.
- This file shows how to connect to your database, execute a query, and return the result of the query. The only code I wrote is the instance variables and the code in GoButton_Click. The rest is generated by .NET. NEW I have added code that saves information that the user enters into the form in a Session object. Now I can transfer the user to a different web page that can use this information to display the correct information.
- This file is the file that receives the control, gets information out of the session object and uses a DataGrid to display the results of the new query.
Basically, in phase 1 you need to be able to do execute certain queries (according to your domain) and show the results of the queries. There are two things you need to do. First, develop a simple interface that shows the queries that users can perform. Second, in your project you need to connect to your database, execute the query, and put the results on the web.