Sunday, June 1, 2008

Default namespaces for web site pages

The ASP.NET pages that you create when using the ASP.NET Web Site model for development do not have a namespace and so belong to the global namespace. You might want to add the namespace in manually for consistency with other pages that you create.

The Visual Studio IDE makes this simple by selecting the class, and using the Surround With > Namespace item in the context menu.

Rambling: This is my first post of this month and this blog is now one month old if you calculate by the calendar month and ignore the dates. I guess that calculation would make a baby born on the 31st of December a year older on the next day, if you go by the year and ignore the month and date.

No comments: