Quick simple pseudo code. Have fun without namespaces you can never do implements and really design code that others write for you.
First you need some code in a file seperate from the form or web page in the app_code folder.
Just type namespace at the top of your code I recomend starting with two levels then the class name is the third level.
namespace whatever.whatever
class dosomething.
end class
end namespace
'then your webpage or form
imports whatever.whatever 'Using whatever.whatever;
'then you can just access the class in your code.
dosomething(visitorid)';
'or write it out
whatever.whatever.dosomething(visitorid)';