Before starting, this tutorial assumes you already have some familiarity with:
- MySQL Connector/NET
- basic MySQL administration
- SQL
- ASP.NET
The overall workflow is simple: install Connector/NET, add the required library to your ASP.NET project, define a connection string, and wrap the connection logic in a reusable class.
After creating your web project, open web.config and add your MySQL connection string. The database name, user, and password should match your local test environment.
Next, add an App_Code folder and create a class such as DatabaseProvider.vb. The original article used VB.NET for the sample:

Here is the core of the provider class:
| |
Then, in the page code-behind, you can instantiate the provider and test the connection:
| |
That is enough for a basic connection test and gives you a simple place to start before expanding into real queries and data access logic.
The original post linked to VB and C# tutorial ZIP files, but those attachments were not present in the migrated WordPress uploads, so they are no longer available in this archive copy.