[Mono-list] Codebehind error

Carlos Cesario ccesario@isic.com.br
Thu, 09 Jan 2003 09:58:04 -0200

Hi.. I'm having problems with Codebehind, I think that it is not 
"calling" source.
Below it follows the error, and the source of the 2 files!


System.Web.HttpException:  ---> System.ApplicationException: The class CSharp.WebForm1 cannot be found.
in <0x002ea> 00 System.Web.Compilation.AspGenerator:PageDirective (System.Web.Compilation.TagAttributes)
in <0x0038a> 00 System.Web.Compilation.AspGenerator:ProcessDirective ()
in <0x00093> 00 System.Web.Compilation.AspGenerator:JustDoIt ()
in <0x00011> 00 System.Web.Compilation.AspGenerator:ProcessElements ()
in <0x00128> 00 System.Web.Compilation.PageCompiler:GenerateSourceFile ()
in <0x0004f> 00 System.Web.Compilation.PageCompiler:GetCompiledType ()
in <0x000e8> 00 System.Web.Compilation.PageCompiler:CompilePageType (System.Web.UI.PageParser)
in <0x0000e> 00 System.Web.UI.PageParser:CompileIntoType ()
in <0x0004e> 00 System.Web.UI.TemplateControlParser:GetCompiledInstance (string,string,System.Web.HttpContext)
in <0x0004c> 00 System.Web.UI.PageParser:GetCompiledPageInstance (string,string,System.Web.HttpContext)
in <0x00014> 00 System.Web.UI.PageHandlerFactory:GetHandler (System.Web.HttpContext,string,string,string)
in <0x001a5> 00 System.Web.HttpApplication:CreateHttpHandler (System.Web.HttpContext,string,string,string)
in <0x00094> 00 .CreateHandlerState:Execute ()
in <0x00092> 00 .StateMachine:ExecuteState (IStateHandler,bool&)
--- End of inner exception stack trace ---


<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="CSharp.WebForm1" %>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
        <meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">
        <meta name="CODE_LANGUAGE" Content="C#">
        <meta name="vs_defaultClientScript" content="JavaScript">
        <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
        <form id="Form1" method="post" runat="server">
        <TABLE id="Table1" cellSpacing="1" cellPadding="1" width="460" border="1">
              <asp:Label id="Label1" runat="server" Width="456px">Label</asp:Label>

 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;
 namespace CSharp
    /// <summary>
    /// Summary description for WebForm1.
    /// </summary>
    public class WebForm1 : System.Web.UI.Page
        protected System.Web.UI.WebControls.Label Label1;
        private void Page_Load(object sender, System.EventArgs e)
            // Put user code to initialize the page here
            Label1.Text = "Hello my World";
        #region Web Form Designer generated code
        override protected void OnInit(EventArgs e)
            // CODEGEN: This call is required by the ASP.NET Web Form Designer.
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
            this.Load += new System.EventHandler(this.Page_Load);



Carlos Cesario