[Mono-list] Does mono support Codebehind in ASP .net?

Golo Haas webmaster@golohaas.de
Sat, 07 Feb 2004 18:34:04 +0100


Hi there,

at the moment, I am trying to do my first steps with ASP .net and 
created a little "Hello World"-example, which functioned perfectly 
(running on mono 0.30 and XSP 0.9) :-).

Now, I've tried to extract the C# code to an extra file and do 
everything using ASP .net's Codebehind feature, but XSP always brings me 
an error message, that the type MyWebApp.Index could not be resolved. As 
I don't see any error within the .aspx oder the .aspx.cs file and I 
don't have the chance to try it on a VS .net, my question is, whether 
mono supports Codebehind at all?

The files are:

index.aspx
----------

<%@ Page Language="C#" AutoEventWireup="false" 
Codebehind="index.aspx.cs" Inherits="MyWebApp.Index" %>

<html>
   <head>
     <title>golohaas.de</title>
   </head>

   <body>
     <span id="Message" runat="server" />
   </body>
</html>


index.aspx.cs
-------------

using System;
using System.Web.UI;
using System.Web.UI.HtmlControls;

namespace MyWebApp
{
   public class Index : Page
   {
     private HtmlGenericControl Message;

     private void PageLoad()
     {
       Message.InnerHTML = "ASP .net mit Codebehind";
     }

     override protected void OnInit(EventArgs eventArgs)
     {
       this.Load += new System.EventHandler(PageLoad);
     }
   }
}


Thanks in advance,


Golo
-- 
Microsoft Community Leader
http://www.golohaas.de