[Mono-bugs] [Bug 76547][Nor] New - Fragment does not work for dynamically loaded page controls

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Oct 25 06:50:57 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 jasonimison at gmail.com.

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

--- shadow/76547	2005-10-25 06:50:57.000000000 -0400
+++ shadow/76547.tmp.31241	2005-10-25 06:50:57.000000000 -0400
@@ -0,0 +1,69 @@
+Bug#: 76547
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: Ubuntu Breezy
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Sys.Web
+AssignedTo: gonzalo at ximian.com                            
+ReportedBy: jasonimison at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Fragment does not work for dynamically loaded page controls
+
+Description of Problem:
+Fragment caching only appears to work for controls that are not dynamically
+loaded.
+
+Steps to reproduce the problem:
+Here's some code that I have modified from the test case shown at
+http://bugzilla.ximian.com/show_bug.cgi?id=52769
+
+This is using the 1.1.9.2 binary install package.
+
+<!-- PageFragmentCaching.aspx -->
+<!-- Sample of how page fragment caching works -->
+<%@ Page Language=C# %>
+<%@ Register TagPrefix=sample TagName=MyControl Src=MyControl.ascx %>
+<script runat=server>
+protected override void OnLoad (EventArgs args)
+{
+    Control myControl = Page.LoadControl("MyControl.ascx");
+    Holder.Controls.Add(myControl);
+}
+</script>
+<html>
+<body>
+<div id="Holder" runat="server" />
+<sample:MyControl runat=server />
+<br>
+Page generated at: <%= DateTime.Now %>
+
+</body>
+</html>
+
+
+<!-- MyControl.ascx -->
+<!-- A user control with caching -->
+<%@ OutputCache Duration="15" VaryByParam="none" %>
+<%@ Control Language="C#" %>
+
+<script runat="server">
+protected override void OnLoad (EventArgs args)
+{
+        Date.Text = "User control generated at: " + DateTime.Now;
+}
+
+</script>
+<asp:Label id='Date' runat=server />
+
+ 
+
+Actual Results:
+
+The control loaded using Page.LoadControl is not cached.


More information about the mono-bugs mailing list