无法加载“newVersion_Default”类型

时间:2021-03-23 09:45:12

Upon trying to build the page Default.aspx I get the error:

在尝试构建页面默认值时。我得到的错误是:

Error 5 Could not load type 'newVersion_Default'. \server1\d$\newVersion\Default.aspx

错误5无法加载“newVersion_Default”类型。美元\ server1 \ d \新\ default . aspx

The content page is:

页面的内容是:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="newVersion_Default" MasterPageFile="Main.master" %>
<%@ MasterType VirtualPath="Main.master" %>

<asp:Content id="Content2" contentplaceholderid="mainContent" runat="server"> 

    <h1>Welcome to this Page</h1>

    <div class="tabWrapper">
        <div class="tab"><a href="#">Home</a></div>
        <div class="tab"><a href="#">Tab 2</a></div>
        <div class="tab tabSelected"><a href="#">Something Els wef wef w efe</a></div>
        <div class="tab"><a href="#">Help!</a></div>
        <div class="clear"></div>
    </div>                
</asp:Content>

And the code behind is empty!

后面的代码是空的!

public partial class newVersion_Default : System.Web.UI.Page
{
}

This is probably a newbie error but any help appreciated :)

这可能是一个新手的错误,但任何帮助都值得赞赏:)

I can't rebuild the whole project yet because there's some other crap in the folders that is classic ASP which wont build and throw errors, so I have to build each page at a time, will this cause problems?

我无法重新构建整个项目,因为文件夹中还有一些其他的垃圾,这是典型的ASP,它不会构建和抛出错误,所以我必须每次构建每个页面,这会导致问题吗?

1 个解决方案

#1


2  

In case of Web app:

如使用Web app:

Try use a namespace:

尝试使用一个名称空间:

Inherits="MySite.newVersion_Default"

namespace MySite
{
    public partial class newVersion_Default : System.Web.UI.Page { }
}

In case of Web site:

如有网站:

Use CodeFile instead of CodeBehind

使用CodeFile代替CodeBehind

#1


2  

In case of Web app:

如使用Web app:

Try use a namespace:

尝试使用一个名称空间:

Inherits="MySite.newVersion_Default"

namespace MySite
{
    public partial class newVersion_Default : System.Web.UI.Page { }
}

In case of Web site:

如有网站:

Use CodeFile instead of CodeBehind

使用CodeFile代替CodeBehind