With ASP.NET pages, if code behind is used, a separate .cs file must contain the C# source code. This C# file must be manually compiled into a .DLL and placed in the Mono /lib directory, so that Mono can make use of it.

However, with XSP, it’s possible to tell Mono where the .cs code behind file is placed, so the whole process is automated. For example, instead of specifying the following Page directive in the .aspx file:

< %@ Page language="c#" Inherits="MonoTest.Test" %>

we could have specified the following one:

< %@ Page language="c#" Inherits="MonoTest.Test" Src="codebehind1.cs" %>

The new Page directive tells Mono where to find the codebehind source file and it’s name.