heh, ok, I've re-uploaded your code pages. i didn't test out hte functionality yet, but i did clean it up and I think i can answer your questions now:
When you create an aspx page, it automatically has a .vb file created as its code behind, and is automatically hooked up to the page. its best NOT to toy with those settings in the aspx design view, as it can get hairy.
There are a few simple ways to share code accross yoru pages:
1. Create a module file (all that is is a .vb file, but inside it has a declaration like this:
Module SomeName
'put your subs/functions here
End Module
Any subs that you delcare public can be accessed from any other files in your project. BUT, in your case, you were trying to access the Application variables in your shared code. This won't work for that, because the modules can't access the Application or Session level variables. so you can either pass those variables from the page, or...
2. Create a class, put the subs/functions within the class, then create an instance of the class (object) when you want to use the code. You'll have to pass in the variables in the same way as well.
But whatever you do, don't try and do the inheritance thing of a code page to a code behind! In old school asp that worked, but its a recipe for disaster with .NET
Take a look at what I did for the pages, and if you have any other questions fire away
hth
D'Arcy