View Single Post
  #4 (permalink)  
Old February 25th, 2008, 01:46 PM
Imar's Avatar
Imar Imar is offline
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts

Hi there,

If the objects are located in App_Data, then no, they are compiled together with the site. Sometimes reopening files or restarting VWD will help as well.

Maybe there is something wrong with your setup or with your site / setup? Here's what I just did and which worked fine:

1. Choose File | New Web Site. Create a new C# web site

2. Added a class called Product to App_Code

3. Inside that class create a new fake method called GetItems that returns List<Product>. The code simply throws an exception to satisfy the compiler.

4. Hit Ctrl+Shift+B to build the site.

5. Added an ODS to Default.aspx in Design View. Got the Product class as expected.

6. Added a new User Control to the site

7. Dragged the UC onto the Design View of Default.aspx. Worked as expected and were able to open the Smart Task panel of the UC.

AFAIK, this is all how it's supposed to work. It works for me every time.

Maybe your situation is different? (I don't have the book, so I don't know the exact steps. In that case, can you elaborate?


Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004