Welcome to the second and final part of this 2 part series regarding how to construct your first ASP.NET application using Visual Studio .NET and SQL Server.
During Building Your First ASP.NET 1.x Application – Part 1 we explored how to use IIS step by step to configure a new virtual directory which can then be used as a project source name for new ASP.NET applications. We also learned how to add CSS visual styling to ASP.NET WebForms, and finally we learned how to use the ADO.NET Data controls for WebForms to connect to an SQL server database.
In this second part of the tutorial we will build upon our sample ASP.NET application and implement the functionality required to allow user login and forms authentication, as well as how to bind data to a DataGrid and DropDownList.
To achieve these requirements we will learn how to work with another ADO.NET data control available in Visual Studio .NET called the SqlCommand object. In addition to this we will learn how to create stored procedures in SQL Server and execute them from our WebForms in order to retrieve the data we need for the required features.
Note: Visual Studio .NET 02/03 running ASP.NET version 1.x is required to implement this tutorial. Additionally, access to an SQL Server with the built in Northwind database is highly recommended as it is the database used as the data source for this tutorial. If you are comfortable with database connectivity you may apply the techniques in this tutorial to another database of your choice.
Both C# and VB.NET code samples will be provided