P
Paul Darroch
Hello
I am trying to develop a class, which I will only use within my ASP.NET
site. I therefore created a class and inserted a simple test method in
it. However, when I try to use this class within my ASP.NET page, I am
told that "Type 'Class1' is not defined", I cannot seem to find out how
I can use this class, that exists within the same project as my ASP.NET
site.
The class' code is:
Namespace Test
Public Class Class1
Public Shared sTitle As String = "hallo"
End Class
End Namespace
The page's code is:
<%@ Page Language="vb" Codebehind="main.aspx.vb" %>
<%@ Import Namespace="PaulSite.test" %>
<script language="VB" runat="server">
Public Sub Page_Load(sender As Object, E As EventArgs)
Dim Data as Class1 = new Class1()
End Sub
</script>
<html>
<head><title>main</title></head>
<body></body>
</html>
I have checked the project properties in VS and it says the root
namespace is "PaulSite"
Is there anyway to use this class without compiling it?
Thanks in advance
Paul
I am trying to develop a class, which I will only use within my ASP.NET
site. I therefore created a class and inserted a simple test method in
it. However, when I try to use this class within my ASP.NET page, I am
told that "Type 'Class1' is not defined", I cannot seem to find out how
I can use this class, that exists within the same project as my ASP.NET
site.
The class' code is:
Namespace Test
Public Class Class1
Public Shared sTitle As String = "hallo"
End Class
End Namespace
The page's code is:
<%@ Page Language="vb" Codebehind="main.aspx.vb" %>
<%@ Import Namespace="PaulSite.test" %>
<script language="VB" runat="server">
Public Sub Page_Load(sender As Object, E As EventArgs)
Dim Data as Class1 = new Class1()
End Sub
</script>
<html>
<head><title>main</title></head>
<body></body>
</html>
I have checked the project properties in VS and it says the root
namespace is "PaulSite"
Is there anyway to use this class without compiling it?
Thanks in advance
Paul