[Mono-bugs] [Bug 36037][Nor] New - Page_Load and CreateChildControls

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
22 Dec 2002 07:29:04 -0000


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 kojoadams@hotmail.com.

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

--- shadow/36037	Sun Dec 22 02:29:03 2002
+++ shadow/36037.tmp.20253	Sun Dec 22 02:29:03 2002
@@ -0,0 +1,41 @@
+Bug#: 36037
+Product: Mono/Class Libraries
+Version: unspecified
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: System.Web
+AssignedTo: gonzalo@ximian.com                            
+ReportedBy: kojoadams@hotmail.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Page_Load and CreateChildControls
+
+xsp does not call the Page_Load method if the control was added in
+CreateChildcontrols(). .net does this however.
+
+Code to reproduce this.
+
+load.aspx:
+<script Language="C#" runat="server" >
+  
+   protected override void CreateChildControls(){
+       Controls.Add( new UserControl().LoadControl(
+Server.MapPath("~/load.ascx") ));
+    }
+</script>
+
+load.ascx:
+<script Language="C#" runat="server" >
+   void Page_Load(object sender, EventArgs e){
+       Controls.Add( new LiteralControl("hi") ));
+    }
+</script>
+
+
+expected output is hi