[Mono-bugs] [Bug 76216][Wis] Changed - data will not bind to web controls in a user control

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat Sep 24 15:35:41 EDT 2005


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by carl at carl-olsen.com.

http://bugzilla.ximian.com/show_bug.cgi?id=76216

--- shadow/76216	2005-09-24 14:45:13.000000000 -0400
+++ shadow/76216.tmp.2386	2005-09-24 15:35:41.000000000 -0400
@@ -37,6 +37,83 @@
 
 Additional Information:
 
 ------- Additional Comments From gonzalo at ximian.com  2005-09-24 14:45 -------
 Please, attach the simplest test case you can get and state the
 version of mono that you're using.
+
+------- Additional Comments From carl at carl-olsen.com  2005-09-24 15:35 -------
+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-bugs mailing list