I'm trying to build a login page and I'm having trouble programming the connection to the database.

The page can be found at http://www.shahspace.com/autobody/index.aspx

Here's the code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<%@Page Explicit="true" Language="VB" Debug="true" Autoeventwireup="false" EnableSessionState="False" EnableViewState="False" %>
<%@ Import Namespace="System.Web.Mail" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="MySql.Data.MySqlClient" %>



<script runat="server">

Dim Connection As MySqlConnection
Dim MDA As MySqlDataAdapter
Dim DS As DataSet

Function Connect() As String

    	Dim ConStr As String = "server=localhost; user id=gib; password=gibpw; database=autobody;"

	Connection = New MySqlConnection(ConStr)
	MDA = new MySqlDataAdapter()
	DS = new DataSet()

	Return "OK"

End Function



<form runat="server">
<table cellpadding=0 cellspacing=0 border=1>
<tr><td colspan=2>Please log in:</td></tr>
<td style="width: 200px;"><asp:textbox style="width: 200px;" id="username_textbox" text="" runat="server"/></td>
<td style="width: 200px;"><asp:textbox style="width: 200px;" id="password_textbox" text="" textmode="password" runat="server"/></td>
<tr><td colspan=2><asp:button id="login_button" text="login" runat="server" /></td></tr>
<!-- AutoPostBack=true -->


The error I get tells me that MySqlConnection is not defined and the troublesome line is:

Dim Connection As MySqlConnection

I know for fact that the importation of MySql.Data.MySqlClient caused problems earlier (it couldn't be found) but I got around it by commenting it out. Now that I need it, I'm uncommenting it, but it's still causing problems.

A lot of the code above I copied over from a site that I know works (http://www.cactusridgerr.com/contact.htm). Among other things, I copied over the page and importation statements, as well as some external files and folders:


Web.Config looks like this:

        <customErrors mode="Off"/>
I'm thinking that as long as I have bin/MySql.Data.dll, I should be fine. I'm obviously wrong. Can someone else see the problem?

Thanks for your help.