[Mono-bugs] [Bug 75511][Wis] New - A public variable on a class related to a User Control isn't settable from the aspx

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Jul 8 19:50:00 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 lpackham at buddyssoftware.com.

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

--- shadow/75511	2005-07-08 19:50:00.000000000 -0400
+++ shadow/75511.tmp.24567	2005-07-08 19:50:00.000000000 -0400
@@ -0,0 +1,39 @@
+Bug#: 75511
+Product: Mono: Class Libraries
+Version: 1.1
+OS: All
+OS Details: Tested on Tiger + Windows XP
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: Sys.Web
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: lpackham at buddyssoftware.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: A public variable on a class related to a User Control isn't settable from the aspx
+
+1. Create a user control with class that inherits from
+System.Web.UserControl behind it.
+
+2. Add a couple of properties to the control:
+
+public string myString1;
+public string myString2;
+
+3. In the ascx, make it display the strings:
+
+ <% Response.Write(myString1); %>
+
+4. In an aspx reference the control and do:
+
+<myc:MyControl ID="blah" runat="server" myString1="Hello World" />
+
+This works in Microsoft .NET. However, in Mono it only works if you use
+proper property methods to access the class.
+
+Although i'm well aware that you are supposed to use get/set... you don't
+'have' to according to Microsoft .NET Framework.


More information about the mono-bugs mailing list