Wednesday, November 10, 2010

Cannot convert type ASP.login_aspx to System.Web.UI.WebControls.Login

Today I encountered this weird error after I published my ASP.NET to the server.
Cannot convert type ASP.login_aspx to System.Web.UI.WebControls.Login

Solution:
1. In login.aspx.cs
Change public partial class Login : System.Web.UI.Page to public partial class myLogin : System.Web.UI.Page

2. In login.aspx
Change <%@ Page Language="C#" ValidateRequest="false" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login" %>
to <%@ Page Language="C#" ValidateRequest="false" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="myLogin" %>

No comments: