[Mono-list] User control no longer working in Mono 1.1.9.1

Carl Olsen carl at carl-olsen.com
Sat Sep 24 10:58:12 EDT 2005


I have a user control (banner.ascx and banner.ascx.cs) that is no longer
working in Mono 1.1.9 and 1.1.9.1 (they were working in Mono 1.1.8, and they
work in Microsoft ASP.NET 1.1).  The page now displays nothing.  The data is
not binding to the label or hyperlink web controls on the page:

<%@ Control Language="c#" AutoEventWireup="false" Src="Banner.ascx.cs" %>
<asp:label id="Greeting" runat="server"
forecolor="#ffffff"></asp:label>&nbsp;
<asp:hyperlink id="UserLink" runat="server" visible="true"
forecolor="#ffffff"></asp:hyperlink>


namespace CarlsWebs.CarlOlsen.Web.Controls
{
	using System;
	using System.Data;
	using System.Drawing;
	using System.Web;
	using System.Web.UI.WebControls;
	using System.Web.UI.HtmlControls;
	using CarlsWebs.WebModules.Accounts.Business;

	public class Banner : System.Web.UI.UserControl
	{
		protected System.Web.UI.WebControls.Label Greeting;
		protected System.Web.UI.WebControls.HyperLink UserLink;

		private void Page_Load(object sender, System.EventArgs e)
		{
			Greeting.Text = "Welcome, ";
			if (Context.User.Identity.IsAuthenticated)
			{
				SiteIdentity id =
(SiteIdentity)Context.User.Identity;
				Greeting.Text += "<b>" + id.FirstName + " "
+ id.LastName + "</b>";
				UserLink.Text = "My Account";
				UserLink.NavigateUrl =
"/Modules/Users/MyAccount.aspx";
			}
			else
			{
				Greeting.Text += "Guest User.";
				UserLink.Text = "Click to Login";
				UserLink.NavigateUrl =
"/Modules/Users/Login.aspx";
			}
		}

		override protected void OnInit(EventArgs e)
		{
			base.OnInit(e);
			InitializeComponent();
		}
		
		private void InitializeComponent()
		{
			this.Load += new
System.EventHandler(this.Page_Load);

		}
	}
}

When I run this in Microsoft ASP.NET 1.1, the web controls are populated, as
they were when I ran this page using Mono 1.1.8.  When I run it in Mono
1.1.9 or 1.1.9.1, nothing appears.  Does anyone know how to fix this?

Carl Olsen
http://www.carl-olsen.com/




More information about the Mono-list mailing list