ASP.NET 2 Namespaces & Shared/Static Members

  • Thread starter Thread starter Chris Welch
  • Start date Start date
C

Chris Welch

I'm developing my company's new site in Visual Studio 2005 (Beta 2) and
I'm wondering if anyone knows if there is a way to set the default
namespace of the Web project. I can't find it in the Web Properties, or
in the Web.Config.

Also, I'm trying to access static/shared methods in Page1.aspx from
Page2.aspx, however Visual Studio doesn't seem to catch on that the
class Page1 even exists. Anyone have any ideas?

Thanks,
Chris
 
I've rebooted VS2005 and the problem seemed to go away. It must just be
a bug in Beta 2.

I'm still having trouble finding the setting for the default namespace
for the project, though, if anyone knows how to do that...

Thanks,
Chris
 
Hi chris:

I tend not to think of web apps in 2005 as not being "projects"
anymore. Mostly because each web form can now compile into a seperate
assembly. I have some details here:

http://odetocode.com/Blogs/scott/archive/2005/06/30/1889.aspx

There is no way to set a default namespace - I know I've seen that
issue come up on Ladybug and MS has said they'll consider it for a
future release.
 
Yes, and when upgrading from projects made with previous versions (where
default ns's are in use), default namespaces will be added explicitly to the
code files.
 
Back
Top