[Mono-list] XSP Server -- Codebehind

Karl Gauthier karl.gauthier@2k1soft.com
20 Feb 2003 10:26:53 -0500


--=-fs9BMIJHsWZ2+uHaBOKt
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hello,
I am not able to display my aspx file using this directive :
********************************
<%@ Page language="C#" Codebehind="frmLogin.aspx.cs"
AutoEventWireup="false" Inherits="Test_Mono_CS.CfrmLogin" %>
********************************

I have compiled my .cs file into a library and when I access my .aspx
file via the XSP server, I get versions of this error:
********************************
System.Web.HttpException:  ---> System.ApplicationException: The class
CfrmLogin cannot be found.
********************************

I have tried other directives like:
********************************
<%@ Import namespace="Test_Mono_CS" %>
<%@ Register tagprefix="TEST" Namespace="Test_Mono_CS"
Assembly="frmLogin.aspx.dll" %>
<%@ Assembly Src="/Test_Mono_CS/bin/frmLogin.aspx.dll" %>
********************************
but it can never find my class

My goal here is to test if we can use aspx files which have code behind
it .
Could anyone help me out? 

Thanks to all,

Karl
R & D
2K1Soft Solutions

--=-fs9BMIJHsWZ2+uHaBOKt
Content-Disposition: attachment; filename="frmLogin (copy).aspx~"
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; name="frmLogin (copy).aspx~"; charset=UTF-8

<%@ Page language=3D"C#" Codebehind=3D"frmLogin.aspx.cs" AutoEventWireup=3D=
"false" Inherits=3D"Test_Mono_CS.CfrmLogin" %>=0D
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">=0D
<HTML>=0D
	<HEAD>=0D
		<title>WebForm1</title>=0D
		<meta content=3D"Microsoft Visual Studio.NET 7.0" name=3D"GENERATOR">=0D
		<meta content=3D"Visual Basic 7.0" name=3D"CODE_LANGUAGE">=0D
		<meta content=3D"JavaScript" name=3D"vs_defaultClientScript">=0D
		<meta content=3D"http://schemas.microsoft.com/intellisense/ie5" name=3D"v=
s_targetSchema">=0D
	</HEAD>=0D
	<body MS_POSITIONING=3D"FlowLayout">=0D
		<form id=3D"Form1" action=3D"frmSite.aspx" method=3D"get" runat=3D"server=
">=0D
			<P><asp:label id=3D"Label1" runat=3D"server" Width=3D"64px">Nom:</asp:la=
bel><asp:textbox id=3D"txtNom" runat=3D"server"></asp:textbox><asp:required=
fieldvalidator id=3D"reqfieldvalNom" runat=3D"server" ErrorMessage=3D"Requi=
redFieldValidator" ControlToValidate=3D"txtNom"></asp:requiredfieldvalidato=
r><BR>=0D
				<asp:label id=3D"Label2" runat=3D"server" Width=3D"64">Password:</asp:l=
abel><asp:textbox id=3D"txtPW" runat=3D"server"></asp:textbox></P>=0D
			<P><asp:button id=3D"bEntrer" runat=3D"server" Text=3D"Entrer"></asp:but=
ton></P>=0D
		</form>=0D
	</body>=0D
</HTML>=0D

--=-fs9BMIJHsWZ2+uHaBOKt
Content-Disposition: attachment; filename=frmLogin.aspx.cs
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; name=frmLogin.aspx.cs; charset=UTF-8

using System;=0D
using System.Collections;=0D
using System.ComponentModel;=0D
using System.Data;=0D
using System.Drawing;=0D
using System.Web;=0D
using System.Web.SessionState;=0D
using System.Web.UI;=0D
using System.Web.UI.WebControls;=0D
using System.Web.UI.HtmlControls;=0D
=0D
namespace Test_Mono_CS=0D
{=0D
	/// <summary>=0D
	/// Summary description for WebForm1.=0D
	/// </summary>=0D
	public class CfrmLogin : System.Web.UI.Page=0D
	{=0D
		protected System.Web.UI.WebControls.Label Label1;=0D
		protected System.Web.UI.WebControls.TextBox txtNom;=0D
		protected System.Web.UI.WebControls.RequiredFieldValidator reqfieldvalNom=
;=0D
		protected System.Web.UI.WebControls.Label Label2;=0D
		protected System.Web.UI.WebControls.TextBox txtPW;=0D
		protected System.Web.UI.WebControls.Button bEntrer;=0D
=09=0D
		private void Page_Load(object sender, System.EventArgs e)=0D
		{=0D
			// Put user code to initialize the page here=0D
		}=0D
=0D
		#region Web Form Designer generated code=0D
		override protected void OnInit(EventArgs e)=0D
		{=0D
			//=0D
			// CODEGEN: This call is required by the ASP.NET Web Form Designer.=0D
			//=0D
			InitializeComponent();=0D
			base.OnInit(e);=0D
		}=0D
	=09=0D
		/// <summary>=0D
		/// Required method for Designer support - do not modify=0D
		/// the contents of this method with the code editor.=0D
		/// </summary>=0D
		private void InitializeComponent()=0D
		{   =20=0D
			this.bEntrer.Click +=3D new System.EventHandler(this.bEntrer_Click);=0D
			this.Load +=3D new System.EventHandler(this.Page_Load);=0D
=0D
		}=0D
		#endregion=0D
=0D
		private void bEntrer_Click(object sender, System.EventArgs e)=0D
		{=0D
			System.Web.UI.WebControls.Label lbl =3D new System.Web.UI.WebControls.La=
bel();=0D
			lbl.Text =3D "YO!!!";=0D
			this.Controls.Add(lbl);=0D
			this.bEntrer.Text=3D"ASDFSDGFASDGFDGDFG";=0D
		}=0D
	}=0D
}=0D

--=-fs9BMIJHsWZ2+uHaBOKt--