asp.net文件重命名

时间:2009-08-16 14:46:15

标签: asp.net file-rename

如何解决以下问题?

我已将'OldMailsCollection.aspx'中的文件重命名为'StudentOldMail.aspx'。

自动重命名代码隐藏文件。我还更新了参考文献。

但是当我编译解决方案时,会打开一个带有随机名称的文件。该文件来自目录

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files

我删除了该文件并再次构建了解决方案。但该文件一次又一次地打开。

显示以下错误消息:

Error   1   ASP.student_studentoldmail_aspx.GetTypeHashCode(): no suitable method found to override c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\web\c0297e2c\521e6c\App_Web_0cva2jmg.6.cs 652

Error   2   ASP.student_studentoldmail_aspx.ProcessRequest(System.Web.HttpContext): no suitable method found to override    c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\web\c0297e2c\521e6c\App_Web_0cva2jmg.6.cs 657

Error   3   ASP.student_studentoldmail_aspx does not implement interface member System.Web.IHttpHandler.IsReusable
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\web\c0297e2c\521e6c\App_Web_0cva2jmg.6.cs 142 

文件是:

#pragma checksum "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "C82498E0638F0D0BB211B2109BA09CD5"
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:2.0.50727.1433
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------



public partial class Student_OldMailsCollection : System.Web.SessionState.IRequiresSessionState {


    #line 8 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
    protected global::System.Web.UI.WebControls.GridView GridView1;

    #line default
    #line hidden


    #line 18 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
    protected global::System.Web.UI.WebControls.ObjectDataSource MailsBySessionObjectDataSource;

    #line default
    #line hidden

    protected System.Web.Profile.DefaultProfile Profile {
        get {
            return ((System.Web.Profile.DefaultProfile)(this.Context.Profile));
        }
    }

    protected System.Web.HttpApplication ApplicationInstance {
        get {
            return ((System.Web.HttpApplication)(this.Context.ApplicationInstance));
        }
    }
}
namespace ASP {

    #line 284 "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\web.config"
    using System.Web.Security;

    #line default
    #line hidden

    #line 281 "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\web.config"
    using System.Web;

    #line default
    #line hidden

    #line 283 "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\web.config"
    using System.Web.SessionState;

    #line default
    #line hidden

    #line 279 "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\web.config"
    using System.Text;

    #line default
    #line hidden

    #line 4 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
    using System.Web.UI.WebControls;

    #line default
    #line hidden

    #line 285 "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\web.config"
    using System.Web.Profile;

    #line default
    #line hidden

    #line 276 "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\web.config"
    using System.Collections;

    #line default
    #line hidden

    #line 4 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
    using System.Web.UI.WebControls.WebParts;

    #line default
    #line hidden

    #line 278 "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\web.config"
    using System.Configuration;

    #line default
    #line hidden

    #line 275 "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\web.config"
    using System;

    #line default
    #line hidden

    #line 1 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
    using ASP;

    #line default
    #line hidden

    #line 282 "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\web.config"
    using System.Web.Caching;

    #line default
    #line hidden

    #line 286 "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\web.config"
    using System.Web.UI;

    #line default
    #line hidden

    #line 277 "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\web.config"
    using System.Collections.Specialized;

    #line default
    #line hidden

    #line 280 "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\web.config"
    using System.Text.RegularExpressions;

    #line default
    #line hidden

    #line 289 "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\web.config"
    using System.Web.UI.HtmlControls;

    #line default
    #line hidden


    [System.Runtime.CompilerServices.CompilerGlobalScopeAttribute()]
    public class student_studentoldmail_aspx : global::Student_OldMailsCollection, System.Web.IHttpHandler {

        private static bool @__initialized;

        private static object @__stringResource;

        private static object @__fileDependencies;

        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        public student_studentoldmail_aspx() {
            string[] dependencies;

            #line 912304 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx.cs"
            ((global::System.Web.UI.Page)(this)).AppRelativeVirtualPath = "~/Student/StudentOldMail.aspx";

            #line default
            #line hidden
            if ((global::ASP.student_studentoldmail_aspx.@__initialized == false)) {
                global::ASP.student_studentoldmail_aspx.@__stringResource = this.ReadStringResource();
                dependencies = new string[4];
                dependencies[0] = "~/Student/StudentOldMail.aspx";
                dependencies[1] = "~/MasterPage.master";
                dependencies[2] = "~/MasterPage.master.cs";
                dependencies[3] = "~/Student/StudentOldMail.aspx.cs";
                global::ASP.student_studentoldmail_aspx.@__fileDependencies = this.GetWrappedFileDependencies(dependencies);
                global::ASP.student_studentoldmail_aspx.@__initialized = true;
            }
            this.Server.ScriptTimeout = 30000000;
        }

        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private global::System.Web.UI.WebControls.BoundField @__BuildControl__control3() {
            global::System.Web.UI.WebControls.BoundField @__ctrl;

            #line 10 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl = new global::System.Web.UI.WebControls.BoundField();

            #line default
            #line hidden

            #line 10 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl.DataField = "MailCode";

            #line default
            #line hidden

            #line 10 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl.HeaderText = "MailCode";

            #line default
            #line hidden

            #line 10 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl.SortExpression = "MailCode";

            #line default
            #line hidden
            return @__ctrl;
        }

        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private global::System.Web.UI.WebControls.BoundField @__BuildControl__control4() {
            global::System.Web.UI.WebControls.BoundField @__ctrl;

            #line 11 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl = new global::System.Web.UI.WebControls.BoundField();

            #line default
            #line hidden

            #line 11 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl.DataField = "MailDate";

            #line default
            #line hidden

            #line 11 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl.HeaderText = "MailDate";

            #line default
            #line hidden

            #line 11 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl.SortExpression = "MailDate";

            #line default
            #line hidden
            return @__ctrl;
        }

        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private global::System.Web.UI.WebControls.BoundField @__BuildControl__control5() {
            global::System.Web.UI.WebControls.BoundField @__ctrl;

            #line 12 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl = new global::System.Web.UI.WebControls.BoundField();

            #line default
            #line hidden

            #line 12 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl.DataField = "SenderUsername";

            #line default
            #line hidden

            #line 12 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl.HeaderText = "SenderUsername";

            #line default
            #line hidden

            #line 12 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl.SortExpression = "SenderUsername";

            #line default
            #line hidden
            return @__ctrl;
        }

        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private global::System.Web.UI.WebControls.BoundField @__BuildControl__control6() {
            global::System.Web.UI.WebControls.BoundField @__ctrl;

            #line 13 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl = new global::System.Web.UI.WebControls.BoundField();

            #line default
            #line hidden

            #line 13 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl.DataField = "MailSubject";

            #line default
            #line hidden

            #line 13 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl.HeaderText = "MailSubject";

            #line default
            #line hidden

            #line 13 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl.SortExpression = "MailSubject";

            #line default
            #line hidden
            return @__ctrl;
        }

        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private global::System.Web.UI.WebControls.BoundField @__BuildControl__control7() {
            global::System.Web.UI.WebControls.BoundField @__ctrl;

            #line 14 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl = new global::System.Web.UI.WebControls.BoundField();

            #line default
            #line hidden

            #line 14 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl.DataField = "MailContent";

            #line default
            #line hidden

            #line 14 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl.HeaderText = "MailContent";

            #line default
            #line hidden

            #line 14 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl.SortExpression = "MailContent";

            #line default
            #line hidden
            return @__ctrl;
        }

        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private global::System.Web.UI.WebControls.BoundField @__BuildControl__control8() {
            global::System.Web.UI.WebControls.BoundField @__ctrl;

            #line 15 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl = new global::System.Web.UI.WebControls.BoundField();

            #line default
            #line hidden

            #line 15 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl.DataField = "ReceiverUsername";

            #line default
            #line hidden

            #line 15 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl.HeaderText = "ReceiverUsername";

            #line default
            #line hidden

            #line 15 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl.SortExpression = "ReceiverUsername";

            #line default
            #line hidden
            return @__ctrl;
        }

        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private void @__BuildControl__control2(System.Web.UI.WebControls.DataControlFieldCollection @__ctrl) {
            global::System.Web.UI.WebControls.BoundField @__ctrl1;

            #line 8 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl1 = this.@__BuildControl__control3();

            #line default
            #line hidden

            #line 8 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl.Add(@__ctrl1);

            #line default
            #line hidden
            global::System.Web.UI.WebControls.BoundField @__ctrl2;

            #line 8 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl2 = this.@__BuildControl__control4();

            #line default
            #line hidden

            #line 8 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl.Add(@__ctrl2);

            #line default
            #line hidden
            global::System.Web.UI.WebControls.BoundField @__ctrl3;

            #line 8 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl3 = this.@__BuildControl__control5();

            #line default
            #line hidden

            #line 8 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl.Add(@__ctrl3);

            #line default
            #line hidden
            global::System.Web.UI.WebControls.BoundField @__ctrl4;

            #line 8 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl4 = this.@__BuildControl__control6();

            #line default
            #line hidden

            #line 8 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl.Add(@__ctrl4);

            #line default
            #line hidden
            global::System.Web.UI.WebControls.BoundField @__ctrl5;

            #line 8 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl5 = this.@__BuildControl__control7();

            #line default
            #line hidden

            #line 8 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl.Add(@__ctrl5);

            #line default
            #line hidden
            global::System.Web.UI.WebControls.BoundField @__ctrl6;

            #line 8 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl6 = this.@__BuildControl__control8();

            #line default
            #line hidden

            #line 8 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl.Add(@__ctrl6);

            #line default
            #line hidden
        }

        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private global::System.Web.UI.WebControls.GridView @__BuildControlGridView1() {
            global::System.Web.UI.WebControls.GridView @__ctrl;

            #line 8 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl = new global::System.Web.UI.WebControls.GridView();

            #line default
            #line hidden
            this.GridView1 = @__ctrl;
            @__ctrl.TemplateControl = this;
            @__ctrl.ApplyStyleSheetSkin(this);

            #line 8 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl.ID = "GridView1";

            #line default
            #line hidden

            #line 8 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl.DataSourceID = "MailsBySessionObjectDataSource";

            #line default
            #line hidden

            #line 8 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl.AutoGenerateColumns = false;

            #line default
            #line hidden

            #line 8 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            this.@__BuildControl__control2(@__ctrl.Columns);

            #line default
            #line hidden
            return @__ctrl;
        }

        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private global::System.Web.UI.WebControls.Parameter @__BuildControl__control10() {
            global::System.Web.UI.WebControls.Parameter @__ctrl;

            #line 21 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl = new global::System.Web.UI.WebControls.Parameter();

            #line default
            #line hidden

            #line 21 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl.Name = "username";

            #line default
            #line hidden

            #line 21 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl.Type = System.TypeCode.String;

            #line default
            #line hidden
            return @__ctrl;
        }

        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private void @__BuildControl__control9(System.Web.UI.WebControls.ParameterCollection @__ctrl) {
            global::System.Web.UI.WebControls.Parameter @__ctrl1;

            #line 18 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl1 = this.@__BuildControl__control10();

            #line default
            #line hidden

            #line 18 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl.Add(@__ctrl1);

            #line default
            #line hidden
        }

        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private global::System.Web.UI.WebControls.ObjectDataSource @__BuildControlMailsBySessionObjectDataSource() {
            global::System.Web.UI.WebControls.ObjectDataSource @__ctrl;

            #line 18 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl = new global::System.Web.UI.WebControls.ObjectDataSource();

            #line default
            #line hidden
            this.MailsBySessionObjectDataSource = @__ctrl;
            @__ctrl.TemplateControl = this;

            #line 18 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl.ID = "MailsBySessionObjectDataSource";

            #line default
            #line hidden

            #line 18 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl.SelectMethod = "GetMailsByUsername";

            #line default
            #line hidden

            #line 18 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl.TypeName = "Ice_Web_Portal.BO.Mail";

            #line default
            #line hidden

            #line 18 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            this.@__BuildControl__control9(@__ctrl.SelectParameters);

            #line default
            #line hidden
            return @__ctrl;
        }

        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private void @__BuildControlContent1(System.Web.UI.Control @__ctrl) {
            System.Web.UI.IParserAccessor @__parser = ((System.Web.UI.IParserAccessor)(@__ctrl));

            #line 4 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__parser.AddParsedSubObject(new System.Web.UI.LiteralControl("\r\n    <table style=\"width: 283px\">\r\n        <tr>\r\n            <td>\r\n             " +
                        "   "));

            #line default
            #line hidden
            global::System.Web.UI.WebControls.GridView @__ctrl1;

            #line 4 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl1 = this.@__BuildControlGridView1();

            #line default
            #line hidden

            #line 4 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__parser.AddParsedSubObject(@__ctrl1);

            #line default
            #line hidden

            #line 4 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__parser.AddParsedSubObject(new System.Web.UI.LiteralControl("\r\n                "));

            #line default
            #line hidden
            global::System.Web.UI.WebControls.ObjectDataSource @__ctrl2;

            #line 4 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl2 = this.@__BuildControlMailsBySessionObjectDataSource();

            #line default
            #line hidden

            #line 4 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__parser.AddParsedSubObject(@__ctrl2);

            #line default
            #line hidden

            #line 4 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__parser.AddParsedSubObject(this.CreateResourceBasedLiteralControl(1516, 404, true));

            #line default
            #line hidden
        }

        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        private void @__BuildControlTree(student_studentoldmail_aspx @__ctrl) {

            #line 1 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl.MasterPageFile = "~/MasterPage.master";

            #line default
            #line hidden

            #line 1 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__ctrl.Title = "Untitled Page";

            #line default
            #line hidden

            #line 1 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            this.InitializeCulture();

            #line default
            #line hidden

            #line 4 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            this.AddContentTemplate("ContentPlaceHolder1", new System.Web.UI.CompiledTemplateBuilder(new System.Web.UI.BuildTemplateMethod(this.@__BuildControlContent1)));

            #line default
            #line hidden
            System.Web.UI.IParserAccessor @__parser = ((System.Web.UI.IParserAccessor)(@__ctrl));

            #line 1 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx"
            @__parser.AddParsedSubObject(new System.Web.UI.LiteralControl("\r\n\r\n"));

            #line default
            #line hidden
        }


        #line 912304 "F:\CS\_WEB_SITES_\ice web portal\Ice_Web_Portal_v_2_0\WEb\Student\StudentOldMail.aspx.cs"
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        protected override void FrameworkInitialize() {
            base.FrameworkInitialize

2 个答案:

答案 0 :(得分:4)

检查aspx页面的@Page指令的Inherits属性,并确保它与代码隐藏中的类名匹配。有时,当它仍然指向旧的类名时会出现此错误。

请参阅:Somebody else with this error.

答案 1 :(得分:1)

我不知道究竟是什么导致了这个问题。避免重命名aspx / cs文件对的一种方法是重新创建文件(以新名称),复制并粘贴代码内容+编辑。它对我有用。