[Mono-bugs] [Bug 71855][Nor] New - ASP.NET: Inconsistent behavior with MS when registering user controls
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Thu, 27 Jan 2005 07:45:46 -0500 (EST)
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 m@pernecky.sk.
http://bugzilla.ximian.com/show_bug.cgi?id=71855
--- shadow/71855 2005-01-27 07:45:46.000000000 -0500
+++ shadow/71855.tmp.13008 2005-01-27 07:45:46.000000000 -0500
@@ -0,0 +1,71 @@
+Bug#: 71855
+Product: Mono: Class Libraries
+Version: 1.0
+OS: other
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Sys.Web
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: m@pernecky.sk
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: ASP.NET: Inconsistent behavior with MS when registering user controls
+
+When registering an user control (with <%@ Register TagPrefix="c"
+TagName="UC" Src="UC.ascx" %>) and also registering controls from a some
+namespace with the same tag prefix (e.g.: <%@ Register TagPrefix="c"
+Namespace="Test" Assembly="Test" %> there is inconsistent behavior with MS
+framework.
+
+When Test namespace contains control UC then there must be a decision met
+about what should <c:UC runat="server" /> be: the UC.ascx user control or
+Test.UC control. MS chooses the user control, Mono the control.
+
+
+Steps to reproduce the problem:
+1. Codebehind (Assembly Test)
+using System;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.HtmlControls;
+
+namespace Test
+{
+ public class UC : UserControl
+ {
+ protected HtmlInputText Input;
+
+ public void Page_Load (object sender, EventArgs e)
+ {
+ Input.Value = "Strig";
+ }
+
+ protected override void OnInit (EventArgs e)
+ {
+ this.Load += new EventHandler (Page_Load);
+ }
+ }
+2. UC.ascx
+
+<%@ Control Inherits="Test.UC" %>
+<input type="text" runat="server" id="Input">
+
+3. Page.ascx
+<%@ Page Language="C#" %>
+<%@ Register TagPrefix="c" TagName="UC" Src="UC.ascx" %>
+<%@ Register TagPrefix="c" Namespace="Test" Assembly="Test" %>
+
+<t:UC runat="server" />
+
+The result in Mono is NullPointerException in UC.Page_Load, because the
+Input attribute is not initialized (because there is no ascx control which
+should fill it).
+
+MS displays the value String in an InputBox.
+
+This behavior is inconsistent with Microsoft.NET Framework 1.1