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/albertpascualSimilar Posts
- Your First Silverlight 1.1 and Ajax Project
- Javascript communication to Silverlight 2.0
- Installing Visual Studio 2008 SP1 Beta.



Comments
Pete on 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.
Speednet on 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 on on 2.07.2008 at 4:16 AM
I just wrap the page in a namesspace and i don't have any problems