Do not call name a Web form "Login.aspx" on VS2008 with ASP.NET 2.0
In Visual Studio 2005 came out the new framework 2.0, in that one, there was a class called Login that had always problems if you create a page called "Login.aspx" as you partial class was going to be called Login.
Now in VS2008 I was hoping for that issue to be resolved, no luck, still I cannot create a page called Login.aspx without having a conflict when compiling.
Related Links
Posted from http://weblogs.asp.net/albertpascual



Comments
Pete said on 2.06.2008 at 5:39 AM
That's crazy. The object for Default.aspx is automatically named _Default, so they should use the same mechanism to solve this.
» Daily Bits - February 6, 2008 Alvin Ashcraft’s Daily Geek Bits: Daily links, development, gadgets and raising rugr said on 2.06.2008 at 8:29 AM
Pingback from » Daily Bits - February 6, 2008 Alvin Ashcraft’s Daily Geek Bits: Daily links, development, gadgets and raising rugrats.
Speednet said on 2.06.2008 at 9:25 AM
Your advice is good if you don't change the class names of your pages and you don't use a namespace. I always change the page class name, so this is never an issue for me.
For example, if I create a page called "login.aspx", I change the default class name to "LoginPage".
Routinely changing the class name for each page like this is a nice way to avoid any naming conflicts, while maintaining consistency and readability throughout the site.
Sean said on 2.07.2008 at 4:16 AM
I just wrap the page in a namesspace and i don't have any problems