[疑问]继承Page报错

AdminPage.cs
 1 None.gif using  System;
 2 None.gif using  System.Data;
 3 None.gif using  System.Configuration;
 4 None.gif using  System.Web;
 5 None.gif using  System.Web.Security;
 6 None.gif using  System.Web.UI;
 7 None.gif using  System.Web.UI.WebControls;
 8 None.gif using  System.Web.UI.WebControls.WebParts;
 9 None.gif using  System.Web.UI.HtmlControls;
10 None.gif namespace  SecondaryBookShop
11 ExpandedBlockStart.gifContractedBlock.gif dot.gif {
12InBlock.gif    public class AdminPage : Page
13ExpandedSubBlockStart.gifContractedSubBlock.gif    dot.gif{        
14InBlock.gif        public AdminPage()
15ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
16InBlock.gif            //当前窗口不在Index.aspx页面上的FRAME中,则重定向到该框架中
17InBlock.gif            if ( Common.GetPageName() != "index.aspx")
18ExpandedSubBlockStart.gifContractedSubBlock.gif            dot.gif{
19InBlock.gif                Context.Response.Write("<script>if(top.document.getElementById('leftmenu')==null) top.location.href='/admin/index.aspx?fromurl=" + Context.Request.RawUrl + "';</script>");
20InBlock.gif                return;
21ExpandedSubBlockEnd.gif            }

22ExpandedSubBlockEnd.gif        }

23ExpandedSubBlockEnd.gif    }

24ExpandedBlockEnd.gif}

25 None.gif
index.aspx
 1 None.gif using  System;
 2 None.gif using  System.Data;
 3 None.gif using  System.Configuration;
 4 None.gif using  System.Collections;
 5 None.gif using  System.Web;
 6 None.gif using  System.Web.Security;
 7 None.gif using  System.Web.UI;
 8 None.gif using  System.Web.UI.WebControls;
 9 None.gif using  System.Web.UI.WebControls.WebParts;
10 None.gif using  System.Web.UI.HtmlControls;
11 None.gif namespace  SecondaryBookShop.Admin
12 ExpandedBlockStart.gifContractedBlock.gif dot.gif {
13InBlock.gif    public partial class index : AdminPage
14ExpandedSubBlockStart.gifContractedSubBlock.gif    dot.gif{
15InBlock.gif        protected void Page_Load(object sender, EventArgs e)
16ExpandedSubBlockStart.gifContractedSubBlock.gif        dot.gif{
17ExpandedSubBlockEnd.gif        }

18ExpandedSubBlockEnd.gif    }

19ExpandedBlockEnd.gif}

20 None.gif


编译报错:

“/”应用程序中的服务器错误。 分析器错误 说明: 在分析向此请求提供服务所需资源时出错。请检查下列特定分析错误详细信息并适当地修改源文件。

分析器错误信息: “SecondaryBookShop.Admin.index”不扩展类“System.Web.UI.Page”,因此此处不允许。

源错误:
行 1:  <%@ Page language="c#" AutoEventWireup="true" CodeBehind="index.aspx.cs" Inherits="SecondaryBookShop.Admin.index" %>行 2:  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">行 3:  <html xmlns="http://www.w3.org/1999/xhtml" >
源文件: /Admin/index.aspx     行: 1

版本信息: Microsoft .NET Framework 版本:2.0.50727.42; ASP.NET 版本:2.0.50727.42

转载于:https://www.cnblogs.com/wysky/archive/2007/06/22/792734.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值