OK, this begins to drive me crazy. I have an asp.net webapp. Pretty straightforward, most of the code in the .aspx.vb, and a few classes in App_Code.
The problem, wh
Sounds like a pre compile issue, particularly because you mention that you get the error and then wait and it disappears. ASP.NET may be still in the process of dynamically compiling your application or it has compiled the types into different assemblies.
With dynamic compilation, you are not guaranteed to have different codebehind files compiled into the same assembly. So the type you are referencing may not be able to be resolved within its precompiled assembly.
Try using the "@Reference" directive to indicate to the runtime that your page and the file that contains your type should be compiled into the same assembly.
@ Reference - MSDN