If you are building an "ASP.NET Web Site Project" (vs. a web application project) any code you wish to be compiled that isn't directly part of an ASPX page needs to be in the App_code directory. That's the special ASP.NET folder that automatically compiles. You could put this class in another assembly and reference it from the web site.
-
Peter