Help on use of class in ASP.NET!
I am learing to use vb.net class for my web applications. The pages I am starting with are pretty simple since I just want to figure out how to using the class for my web applicatons. I created a simple .aspx webform page and wrote a namespace in a separate .vb file which contains the class I defined. Both files are located under the same project folder. But when I try to view the .aspx webform in browser, I got the error message which says BC30002: Type 'Database' is not defined (Database is the class I created in .vb file) Is there anyone can help me out? Really appreciate it!! I am pasting my code as follows.
1. database.vb
Imports System
Imports System.Data
Imports System.Data.OleDb
Namespace MYNAME
Public Class Database
End Class
End Namespace
2. Here is the code for my .aspx file
WebForm1.aspx
<%@ Page Language="vb" %>
<%@ Import Namespace="MYNAME" %>
<script runat="server">
sub Page_Load (obj as object, e as eventargs)
dim objDatabase as new Database
lblmessage.text="object created"
end sub
</script>
<HEAD>
<title>WebForm1</title>
</HEAD>
<HTML>
<body>
<asp:Label id="lblMessage" style="Z-INDEX: 101; LEFT: 96px;
POSITION: absolute; TOP: 96px"
runat="server" Width="104px" Height="24px">
</asp:Label>
</body>
</HTML>