C# CS0103:编辑现有的工作代码文件时,当前上下文中不存在该名称

C# CS0103:编辑现有的工作代码文件时,当前上下文中不存在该名称,c#,asp.net,asp.net-mvc,webforms,C#,Asp.net,Asp.net Mvc,Webforms,我需要ASP.NETMVC项目的帮助。这个项目运行得很好,但是当我尝试做一些更改时,我得到了这个错误 CS0103当前文档中不存在名称“ASPxDocumentViewer1” 上下文2\u报告\u FinIncomeStatement.aspx,经纪公司 我有3个文件,我正在工作 FinIncomeStatement.aspx FinIncomeStatement.aspx.cs FinIncomeStatement.aspx.designer.cs 示例代码 在FinIncomeStat

我需要ASP.NETMVC项目的帮助。这个项目运行得很好,但是当我尝试做一些更改时,我得到了这个错误

CS0103当前文档中不存在名称“ASPxDocumentViewer1” 上下文2\u报告\u FinIncomeStatement.aspx,经纪公司

我有3个文件,我正在工作

FinIncomeStatement.aspx
FinIncomeStatement.aspx.cs
FinIncomeStatement.aspx.designer.cs

示例代码

在FinIncomeStatement.aspx文件中

在FinIncomeStatement.aspx.designer.cs文件中

//------------------------------------------------------------------------------

//删除aspx文件的这一部分

Inherits="BrokerOffice.Reporting.FinIncomeStatement"
因为您没有在此页面上继承任何内容

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace BrokerOffice.Reporting
{
    public partial class FinIncomeStatement : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Page_Init(object sender, EventArgs e)
        {

              XtraFinIncomeStatement report = new XtraFinIncomeStatement();


               ASPxDocumentViewer1.Report = report;
        }

    }
}
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated. 
// </auto-generated>
//------------------------------------------------------------------------------

namespace BrokerOffice.Reporting {


    public partial class FinIncomeStatement {

        /// <summary>
        /// ASPxDocumentViewer1 control.
        /// </summary>
        /// <remarks>
        /// Auto-generated field.
        /// To modify move field declaration from designer file to code-behind file.
        /// </remarks>
        protected global::DevExpress.XtraReports.Web.ASPxDocumentViewer ASPxDocumentViewer1;
    }
}
Inherits="BrokerOffice.Reporting.FinIncomeStatement"