[Mono-devel-list] ASP.NET: Cannot find type

Rafael Teixeira monoman at gmail.com
Mon Jul 4 18:18:37 EDT 2005


You need to compile the C# file as VS.NET does for you when it handles
the 'codebehind' attribute in @page directive...

:|

On 7/4/05, Slava Petrenko <slava at z.org.ua> wrote:
> hi all,
> 
> any ideas how to find out why defined type doesn't get found?
> 
> i've got this:
> 
> 
>   Server Error in '/test' Application
> 
> ------------------------------------------------------------------------
> 
> 
>     /Parser Error/
> 
> *Description: *Error parsing a resource required to service this
> request. Review your source file and modify it to fix this error.
> 
> *Error message: *Cannot find type CMSNET._Default
> 
> *File name: * /home/slava/web/CMSNET/Default.aspx    *Line: *1 **
> 
> ***Source Error: * **
> ||
> 
> <%@ Page language="c#" Codebehind="Default.aspx.cs" AutoEventWireup="false" Inherits="CMSNET._Default" %>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
> <HTML>
>     <HEAD>
> 
> 
> 
> 
> <Default.aspx.cs> - is at the same catalog as Default.aspx is
> 
> *using* System;
> *using* System.Collections;
> *using* System.ComponentModel;
> *using* System.Data;
> *using* System.Drawing;
> *using* System.Web;
> *using* System.Web.SessionState;
> *using* System.Web.UI;
> *using* System.Web.UI.WebControls;
> *using* System.Web.UI.HtmlControls;
> 
> *using* CMSNET.Common;
> 
> *namespace* CMSNET
> {
> //    *public* *class* _Default : System.Web.UI.Page
>     {
> *       protected* System.Web.UI.WebControls.HyperLink HyperLink1;
> *
>        private* void Page_Load(object sender, System.EventArgs e)
>         {
>             string ready = *new* AppEnv(Context).GetAppSetting("ready");
> 
>             *if*(ready.Equals("true"))
>             {
>                 Response.Redirect("CDA/HomePg.aspx");
>             }
>         }
> 
>         #region Web Form Designer generated code
>         *override* *protected* void OnInit(EventArgs e)
>         {
>                 InitializeComponent();
>         *       base*.OnInit(e);
>         }
> 
>         *private* void InitializeComponent()
>         {
>             *this*.Load += *new* System.EventHandler(*this*.Page_Load);
> 
>         }
>         #endregion
>     }
> }
> 
> </Default.aspx.cs>
> 
> 
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
> 


-- 
Rafael "Monoman" Teixeira
---------------------------------------
I'm trying to become a "Rosh Gadol" before my own eyes. 
See http://www.joelonsoftware.com/items/2004/12/06.html for enlightment.
It hurts!



More information about the Mono-devel-list mailing list