What is the right way to include class files and structure definitions on my .NET website?

58 Views Asked by At

I build sites in .NET without using Visual Studio.

Are virtual includes the right way to include my class definition files?

For example this is what the first few lines of my page look like:

<!--#include file="classDefinition.aspx"-->
<!--#include file="anotherClassDefinition.aspx"-->
<script language="VB" runat="server">

     'page load sub, etc

In classDefinition.aspx, I have defined a structure outside of the class. The first few lines of classDefinition.aspx look like this:

<script language="VB" runat="server">

Structure loginInfo
    public loginID as string
    public somethingElse as string
    public permissions as hashtable
End structure

I am getting type not defined errors when I try to declare a private member as loginInfo in anotherClassDefinition.aspx. Why is this happening?

1

There are 1 best solutions below

1
On BEST ANSWER

You should create ordinary .vb files in the App_Code directory.
You don't need to include anything, anywhere.