准备母版页的问题 [英] problems on preparing master page

查看:77
本文介绍了准备母版页的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

先生...

我在使用模板准备母版页时遇到一些问题我的页面的代码正在下面添加..所有页面都有相同的错误





 <%@       标题  =    语言  =  C#    MasterPageFile   = 〜/ Site .master    AutoEventWireup   =  true    CodeFile   =  repported_success。 aspx.cs   继承  =  repported_success   %>  

< asp:Content ID = Content2 ContentPlaceHolderID = ContentPlaceHolder5 Runat = 服务器 >
< br < span class =code-attribute> / > < 对齐 = center cellpadding = 0 cellspacing = 0 style = width:100%; background-image:removed('http:// localhost:49178 / NEW / images / mainbg.png');背景删除:中​​心顶部; background-repeat:no-repeat; >
< < span class =code-leadattribute> tr > < td > < / td > < / tr >
< tr > < td > < / td > < < span class =code-leadattribute> / tr >
< tr class = text_style > < td align = center >
您的投诉已成功报告。< / td > < / tr >
< tr class = text_style > < td align = center >
您最早将通过电子邮件收到确认邮件和案例编号< / td > < / tr >
< tr > < td > < / td > < / tr >
< tr > < td > < span class = heading2 > nbsp;感谢您使用在线犯罪报告向导< / span > < / td > ; < / tr >
< tr > < td > < / td > < span class =code-keyword>< / tr >
< tr > < td > < / td > < / tr >
< tr > < td < span class =code-keyword>> < / td > < / tr >
< tr > < td > < / td > < / tr < span class =code-keyword>>
< tr > < td > < / td > < / tr > < / table >







但Iam面临错误等as ...



错误 23 确保 class   代码文件与' 继承'属性,并且它扩展了正确的 base   class (例如Page或UserControl)。 D:\ NEWW; \\ Site.master.cs  8   33  D:\ NEWW \ 
错误 24 d:\ NEWW\Site.master.cs( 8 ):错误ASPNET:确保 class 代码文件匹配' 继承'属性,并且它扩展了正确的 base class (例如Page或UserControl)。
错误 25 d:\ NEWW\Site.master.cs( 8 ):错误ASPNET:确保
中定义 代码文件匹配' 继承'属性,并且它扩展了正确的 base class (例如Page或UserControl)。
错误 26 d:\ NEWW\Site.master.cs( 8 ):错误ASPNET:确保
中定义 代码文件匹配' 继承'属性,并且它扩展了正确的 base class (例如Page或UserControl)。
错误 27 d:\ NEWW\Site.master.cs( 8 ):错误ASPNET:确保
中定义 代码文件匹配' 继承'属性,并且它扩展了正确的 base class (例如Page或UserControl)。







你可以帮我吗???

解决方案

确保你的repported_success.cs文件有类名如下:



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


sir...
I am facing some problems on preparing master pages with templates the code of one my page is adding below.. all pages have same errors


<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="repported_success.aspx.cs" Inherits="repported_success" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder5" Runat="Server">
<br />        <table align="center" cellpadding="0" cellspacing="0" style="width: 100%; background-image: removed('http://localhost:49178/NEW/images/mainbg.png'); background-removed: center top; background-repeat: no-repeat;">           
            <tr> <td>  </td> </tr>
            <tr> <td>  </td> </tr> 
            <tr class="text_style"> <td align="center">
                    Your complaint have been reported successfully.</td> </tr>
            <tr class="text_style"> <td align="center">
 You will receive a confirmation  mail and case number  by E mail at the earliest </td> </tr>
            <tr> <td> </td></tr>
            <tr> <td> <span class="heading2">                                  nbsp;   THANK YOU FOR USING THE ONLINE CRIME REPORTING WIZARD    </span> </td> </tr>
            <tr> <td>  </td> </tr>
            <tr> <td>  </td> </tr>
            <tr> <td>  </td> </tr>
            <tr> <td>  </td> </tr>
            <tr> <td>   </td> </tr> </table>




But Iam facing errors such as...

Error	23	Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class (e.g. Page or UserControl).	D:\NEW\Site.master.cs	8	33	D:\NEW\
Error	24	d:\NEW\Site.master.cs(8): error ASPNET: Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class (e.g. Page or UserControl).		
Error	25	d:\NEW\Site.master.cs(8): error ASPNET: Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class (e.g. Page or UserControl).		
Error	26	d:\NEW\Site.master.cs(8): error ASPNET: Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class (e.g. Page or UserControl).		
Error	27	d:\NEW\Site.master.cs(8): error ASPNET: Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class (e.g. Page or UserControl).




can u help me???

解决方案

Make sure your repported_success.cs file has class name like follows:

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


这篇关于准备母版页的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆