Do not call name a Web form "Login.aspx" on VS2008 with ASP.NET 2.0

written by Al on Tuesday, February 05 2008

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

https://blogs.msdn.com/rahulso/archive/2006/07/03/cs0030-cannot-convert-type-asp-login-aspx-to-system-web-ui-webcontrols-login.aspx

Posted from http://weblogs.asp.net/albertpascual

 

Similar Posts

  1. Your First Silverlight 1.1 and Ajax Project
  2. Javascript communication to Silverlight 2.0
  3. Installing Visual Studio 2008 SP1 Beta.

Comments

  • Pete on on 2.06.2008 at 5:39 AM

    Pete avatar

    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

    Speednet avatar

    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

    Sean avatar

    I just wrap the page in a namesspace and i don't have any problems

Comments are closed

Options:

Size

Colors