Instantiating control instances - VS2005 Websites

  • Thread starter Thread starter David Rees
  • Start date Start date
D

David Rees

I haven't yet installed the VS2005 Web Application project type, since I'm
naivly waiting for VS2005SP1 to come out before Duke Nukem Forever.

My VS2005 installation also crashed twice whilst working on a simple ASP.NET
2.0 Website, surely part of "Trustworthy computing" involves me *trusting*
my computer's 1st party software not to let me down. Good thing I save
regularly.

Anyway, it's a simple ASP.NET 2.0 Website with a User Control class
("Html4Page") in a sub-folder and an ASPX page class in the root
("SearchPage"). Both of the files have their class definitions inside
namespaces ("W3b.Forumspile.Search")

In the ASPX's parent class (i.e. "codebehind" in newspeak) I've got this:

IPage = new W3b.Forumspile.Search.Html4Page();

....but ASP.NET and VS2005 both throw wobblies about the classes not
existing.

Here's a bunch of screenshot stitched together showing the problem:

http://www.w3bdevil.com/privmisc/ASPNET20Types.png (2560x960, the Solution
Explorer window is to the right of the main window)

Since ASP.NET2.0 is type-safe, yet compiled at runtime, how am I supposed to
get this to work? Y'see, this is why I prefer VS2003: it actually worked
without any special "App_Code" directories.
 
Oh, and it gets worse:

After a bit of work elsewhere, I cannot debug the controls, yet I *can*
debug pages. I get messages about the "symbols not being loaded" for the
controls, but not the pages.
 
Back
Top