Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jun 04, 2008 08:12 AM by dannyg_uk
Jun 01, 2008 10:19 PM|LINK
After adding a subfolder, Order_Details for example, to the CustomPages folder, adding List.aspx and its subfiles immediately creates a bunch of name conflicts with the 5/23/08 bits. This doesn't occur for the same process with file-system Web Sites.
This makes it evident why the Onyx sample projects only use file-system Web Sites.
What's the schedule for fixing this and is there a temporary workaround?
Jun 01, 2008 11:04 PM|LINK
Hi Roger I think its just a namespace issue if you change the class name of the page it should work OK.
Dynamic Data WebApplicationProject
Jun 01, 2008 11:09 PM|LINK
I think what you're seeing is actually the expected behavior if you are just copying List.aspx from PageTemplates into the custom page folder. The problem is that in a Web App, everything gets compiled as one DLL, and bad things happen if you end up with
two classed with the same namespace and name. The fix is trivial: use a different namespace for the custom page. e.g. instead of WebApplication1, use WebApplication1.Order_Details as a namespace. You'll need to change this both in List.aspx (in the 'inherits'
attribute) and in List.aspx.cs (as the namespace).
Jun 01, 2008 11:11 PM|LINK
Steve beat me to it! As he points out, you can also choose to change the class name instead of the namespace, which will work as well. One way or another, you need to avoid the full class name duplication.
Jun 02, 2008 02:34 PM|LINK
David and Steve,
Thanks for the reply. It looked to me to be a namespace/classname issue, but wanted to make sure it wasn't cockpit error on my part before writing about it.
Thanks also for your frequent and detailed blog posts on ADO.NET Dynamic Data. The product is shaping up as a more-than-worthy replacement for Blinq (http://oakleafblog.blogspot.com/2006/06/generate-data-based-web-sites-with.html).
Jun 02, 2008 06:31 PM|LINK
Eliminate Ambiguous Object References when Customizing ADO.NET Dynamic Data Pages in Web Apps post, which deals with this topic, is live.
Is a fix for this problem in the works?
Jun 02, 2008 08:09 PM|LINK
Thanks for blogging the solution Roger!
Jun 03, 2008 04:27 PM|LINK
I am getting a "The resource cannot be found" error from a Web Site Project. I have added a Cutomers directory (which matches one of my data entities) to CustomPages and copied Details.aspx files from PageTemplates. The website works fine when I remove the
Customers directory from CustomPages. Anyone come across this before?
Jun 03, 2008 04:46 PM|LINK
Hi Danny, are you running the latest version Visual Studio 2008 SP1 beta + 5/23 release see
here. I've just build a site based on Northwind in a DynamicData Web Applicaion no problems.
Dynamic Data 5-23 Release
Jun 03, 2008 04:59 PM|LINK
Also, what's the URL you're going it when you get this error? Note that this seems unrelated to the issue discussed in this thread, so it would be best to start a separate thread to avoid confusion between the two.