[MonoDevelop] ASP.NET 2.0 -Master Page

John Anderson sontek at gmail.com
Sun May 20 22:39:25 EDT 2007


Looks to me like your monodevelop is setup to use .NET 1.1 instead of .net
2.0, go to the properties of your project and make sure you are using .net
2.0 (gmcs) because masterpages aren't supported in 1.1

On 5/20/07, Paulo Aboim Pinto <esqueleto at tusofona.com> wrote:
>
> Hello
>
> I don't know if this problem is from Mono it self or MonoDevelop, then I
> put here.
>
> I try to create a ASP.NET project with MasterPages and this is my master
> page file and aspx file:
>
> master page file:
>
> <%@ Master Language="C#" CodeFile="chezTolib.master.cs"
> Inherits="chezTolib" %>
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>
> <html xmlns="http://www.w3.org/1999/xhtml" >
> <head runat="server">
>      <title>Untitled Page</title>
> </head>
> <body>
>      <form id="form1" runat="server">
>      <div>
>          <asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
>          </asp:contentplaceholder>
>      </div>
>      </form>
> </body>
> </html>
>
>
>
> aspx file:
>
> <%@ Page Language="C#" AutoEventWireup="true"
> CodeFile="Default.aspx.cs" Inherits="Default"
> MasterPageFile="~/chezTolib.master" %>
>
> <asp:Content ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
> this is written in default.aspx
> </asp:Content>
>
>
> and I get this error:
>
> Server Error in '/' Application
> Compilation Error
>
> Description: Error compiling a resource required to service this
> request. Review your source file and modify it to fix this error.
>
> Error message:
>
> /tmp/esqueleto-temp-aspnet-0/3ae7dee8/584f4c82.0.cs(62,32) : error
> CS0115: `ASP.cheztolib_master.AutoHandlers' is marked as an override but
> no suitable property found to override
> /tmp/esqueleto-temp-aspnet-0/3ae7dee8/584f4c82.0.cs(71,32) : error
> CS0115: `ASP.cheztolib_master.TemplateSourceDirectory' is marked as an
> override but no suitable property found to override
> /tmp/esqueleto-temp-aspnet-0/3ae7dee8/584f4c82.0.cs(140,33) : error
> CS0115: `ASP.cheztolib_master.FrameworkInitialize()' is marked as an
> override but no suitable method found to override
>
> File name:
>
> /home/esqueleto/Projects/MasterPageExample/MasterPageExample/chezTolib.master
>
> Source File: /tmp/esqueleto-temp-aspnet-0/3ae7dee8/584f4c82.0.cs
>
> Line 1: //
>
> ------------------------------------------------------------------------------
> Line 2: //  <autogenerated>
> Line 3: //      This code was generated by a tool.
> Line 4: //      Mono Runtime Version: 2.0.50727.42
> Line 5: //
> Line 6: //      Changes to this file may cause incorrect behavior and
> will be lost if
> Line 7: //      the code is regenerated.
> Line 8: //  </autogenerated>
> Line 9: //
>
> ------------------------------------------------------------------------------
> Line 10:
> Line 11:
> Line 12:
> Line 13: public partial class chezTolib {
> Line 14:
> Line 15:     protected System.Web.UI.HtmlControls.HtmlHead _bctrl_1;
> Line 16:
> Line 17:     protected System.Web.UI.HtmlControls.HtmlTitle _bctrl_2;
> Line 18:
> Line 19:     protected System.Web.UI.HtmlControls.HtmlForm form1;
> Line 20:
> Line 21:     protected System.Web.UI.WebControls.ContentPlaceHolder
> ContentPlaceHolder1;
> Line 22:
> Line 23:     protected System.Web.HttpApplication ApplicationInstance {
> Line 24:         get {
> Line 25:             return
> ((System.Web.HttpApplication)(this.Context.ApplicationInstance));
> Line 26:         }
> Line 27:     }
> Line 28: }
> Line 29: namespace ASP {
> Line 30:     using System;
> Line 31:     using System.Collections;
> Line 32:     using System.Collections.Specialized;
> Line 33:     using System.Configuration;
> Line 34:     using System.Text;
> Line 35:     using System.Text.RegularExpressions;
> Line 36:     using System.Web;
> Line 37:     using System.Web.Caching;
> Line 38:     using System.Web.SessionState;
> Line 39:     using System.Web.Security;
> Line 40:     using System.Web.Profile;
> Line 41:     using System.Web.UI;
> Line 42:     using System.Web.UI.WebControls;
> Line 43:     using System.Web.UI.HtmlControls;
> Line 44:
> Line 45:
> Line 46:     public class cheztolib_master : global::chezTolib {
> Line 47:
> Line 48:         private static bool __initialized = false;
> Line 49:
> Line 50:         private static int __autoHandlers;
> Line 51:
> Line 52:         private System.Web.UI.ITemplate
> __Template_ContentPlaceHolder1;
> Line 53:
> Line 54:         public cheztolib_master() {
> Line 55:
> ((System.Web.UI.MasterPage)(this)).AppRelativeVirtualPath =
> "~/chezTolib.master";
> Line 56:             if ((cheztolib_master.__initialized == false)) {
> Line 57:                 cheztolib_master.__initialized = true;
> Line 58:             }
> Line 59:         }
> Line 60:
> Line 61:         [System.Obsolete()]
> Line 62:         protected override int AutoHandlers {
> Line 63:             get {
> Line 64:                 return ASP.cheztolib_master.__autoHandlers;
> Line 65:             }
> Line 66:             set {
> Line 67:                 ASP.cheztolib_master.__autoHandlers = value;
> Line 68:             }
> Line 69:         }
> Line 70:
> Line 71:         public override string TemplateSourceDirectory {
> Line 72:             get {
> Line 73:                 return "/";
> Line 74:             }
> Line 75:         }
> Line 76:
> Line 77:         private void __BuildControlTree(cheztolib_master __ctrl)
> {
> Line 78:             System.Web.UI.IParserAccessor __parser =
> ((System.Web.UI.IParserAccessor)(__ctrl));
> Line 79:             __parser.AddParsedSubObject(new
> System.Web.UI.LiteralControl("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML
> 1.0 Transitional//EN\"
> \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\n<html
> xmlns=\"http://www.w3.org/1999/xhtml\" >\n"));
> Line 80:             this.__BuildControl__bctrl_1();
> Line 81:             __parser.AddParsedSubObject(this._bctrl_1);
> Line 82:             __parser.AddParsedSubObject(new
> System.Web.UI.LiteralControl("\n<body>\n    "));
> Line 83:             this.__BuildControl_form1();
> Line 84:             __parser.AddParsedSubObject(this.form1);
> Line 85:             __parser.AddParsedSubObject(new
> System.Web.UI.LiteralControl("\n</body>\n</html>"));
> Line 86:         }
> Line 87:
> Line 88:         private System.Web.UI.Control __BuildControl__bctrl_1() {
> Line 89:             System.Web.UI.HtmlControls.HtmlHead __ctrl;
> Line 90:             __ctrl = new
> System.Web.UI.HtmlControls.HtmlHead("head");
> Line 91:             this._bctrl_1 = __ctrl;
> Line 92:             this.__BuildControl__bctrl_2();
> Line 93:             System.Web.UI.IParserAccessor __parser =
> ((System.Web.UI.IParserAccessor)(__ctrl));
> Line 94:             __parser.AddParsedSubObject(this._bctrl_2);
> Line 95:             return __ctrl;
> Line 96:         }
> Line 97:
> Line 98:         private System.Web.UI.Control __BuildControl__bctrl_2() {
> Line 99:             System.Web.UI.HtmlControls.HtmlTitle __ctrl;
> Line 100:             __ctrl = new System.Web.UI.HtmlControls.HtmlTitle();
> Line 101:             this._bctrl_2 = __ctrl;
> Line 102:             System.Web.UI.IParserAccessor __parser =
> ((System.Web.UI.IParserAccessor)(__ctrl));
> Line 103:             __parser.AddParsedSubObject(new
> System.Web.UI.LiteralControl("Untitled Page"));
> Line 104:             return __ctrl;
> Line 105:         }
> Line 106:
> Line 107:         private System.Web.UI.Control __BuildControl_form1() {
> Line 108:             System.Web.UI.HtmlControls.HtmlForm __ctrl;
> Line 109:             __ctrl = new System.Web.UI.HtmlControls.HtmlForm();
> Line 110:             this.form1 = __ctrl;
> Line 111:             __ctrl.ID = "form1";
> Line 112:             System.Web.UI.IParserAccessor __parser =
> ((System.Web.UI.IParserAccessor)(__ctrl));
> Line 113:             __parser.AddParsedSubObject(new
> System.Web.UI.LiteralControl("\n    <div>\n        "));
> Line 114:             this.__BuildControl_ContentPlaceHolder1();
> Line 115:             __parser.AddParsedSubObject(this.ContentPlaceHolder1
> );
> Line 116:             __parser.AddParsedSubObject(new
> System.Web.UI.LiteralControl("\n    </div>\n    "));
> Line 117:             return __ctrl;
> Line 118:         }
> Line 119:
> Line 120:         private System.Web.UI.Control
> __BuildControl_ContentPlaceHolder1() {
> Line 121:             System.Web.UI.WebControls.ContentPlaceHolder __ctrl;
> Line 122:             __ctrl = new
> System.Web.UI.WebControls.ContentPlaceHolder();
> Line 123:             this.ContentPlaceHolder1 = __ctrl;
> Line 124:             this.ContentPlaceHolders.Add(__ctrl);
> Line 125:             if ((this.ContentTemplates != null)) {
> Line 126:                 this.__Template_ContentPlaceHolder1 =
> ((System.Web.UI.ITemplate)(this.ContentTemplates["ContentPlaceHolder1"]));
> Line 127:             }
> Line 128:             if ((this.__Template_ContentPlaceHolder1 != null)) {
> Line 129:
> this.__Template_ContentPlaceHolder1.InstantiateIn(__ctrl);
> Line 130:             }
> Line 131:             else {
> Line 132:                 System.Web.UI.IParserAccessor __parser =
> ((System.Web.UI.IParserAccessor)(__ctrl));
> Line 133:                 __parser.AddParsedSubObject(new
> System.Web.UI.LiteralControl("\n        "));
> Line 134:             }
> Line 135:             __ctrl.TemplateControl = this;
> Line 136:             __ctrl.ID = "ContentPlaceHolder1";
> Line 137:             return __ctrl;
> Line 138:         }
> Line 139:
> Line 140:         protected override void FrameworkInitialize() {
> Line 141:             base.FrameworkInitialize();
> Line 142:             this.__BuildControlTree(this);
> Line 143:         }
> Line 144:     }
> Line 145: }
>
> 5/21/2007 12:48:24 AM
>
>
>
>
> any one can help me?
>
>
> tkx in advance
> Paulo Aboim Pinto
> _______________________________________________
> Monodevelop-list mailing list
> Monodevelop-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monodevelop-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/monodevelop-list/attachments/20070520/4720c32b/attachment-0001.html 


More information about the Monodevelop-list mailing list