PDA

View Full Version : Using a class


illogix
02-29-04, 11:43 AM
Hi,
I'm a php programmer trying to learn asp.net.

I have created a class named Navigation in a file Navigation.vb, how do I use the class in my asp page ?

In php I would just include the file containing the class definition, how do I do that in asp.net ?

Thank you.

busyweb
03-14-04, 12:25 AM
Hi,
I'm a php programmer trying to learn asp.net.

I have created a class named Navigation in a file Navigation.vb, how do I use the class in my asp page ?

In php I would just include the file containing the class definition, how do I do that in asp.net ?

Thank you.

Hello,
It depends on the Navigation.vb 's function?

Is it displaying menu items? --> in this case, you may need to create Control class (Web User Control, or Custom Server Control, ...etc) instead of just class outputing string...

Is it contain navigational business rules? --> in this case, if class file is in the application folder, you can just refer the class name inside .aspx code behind file or from script block of .aspx file.

Thanks