Web Hosting Talk







View Full Version : ASP.Net classes


illogix
02-29-2004, 03:15 PM
Hi,
I'm trying asp.net to make my first asp.net application. I'm already an experienced VB, C++, Java, PHP developper.

I created a class named Navigation in a Navigation.vb file.

Now I want to use this class in my asp file which is catalog.aspx. How do I go about doing so ?

Basically I want to import my class into the page.

With PHP I would simply include the file containing the class definition and then create an instance.

Thank you for your help.

Primal Blue
02-29-2004, 09:27 PM
If your class is in a different name space you'll have to refrence the namespace


using myNameSpace.MyClassNameSpace;


Otherwise just use it like any other class.


MyClass _class = new MyClass();

_class.Method();