Author: igorz
Date: 2007-11-07 11:36:02 -0500 (Wed, 07 Nov 2007)
New Revision: 89120
Modified:
trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
trunk/mcs/class/System.Web/System.Web.UI.WebControls/WebControl.cs
trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/ChangeLog
trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/WebControlTest.cs
Log:
2007-11-07 Igor Zelmanovich <[EMAIL PROTECTED]>
* WebControl.cs: enabled state restored properly.
2007-11-07 Igor Zelmanovich <[EMAIL PROTECTED]>
* WebControlTest.cs:
Added new test.
Modified: trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
2007-11-07 16:24:21 UTC (rev 89119)
+++ trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
2007-11-07 16:36:02 UTC (rev 89120)
@@ -1,3 +1,7 @@
+2007-11-07 Igor Zelmanovich <[EMAIL PROTECTED]>
+
+ * WebControl.cs: enabled state restored properly.
+
2007-11-06 Igor Zelmanovich <[EMAIL PROTECTED]>
* TextBox.cs:
Modified: trunk/mcs/class/System.Web/System.Web.UI.WebControls/WebControl.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI.WebControls/WebControl.cs
2007-11-07 16:24:21 UTC (rev 89119)
+++ trunk/mcs/class/System.Web/System.Web.UI.WebControls/WebControl.cs
2007-11-07 16:36:02 UTC (rev 89120)
@@ -567,7 +567,7 @@
attributes = new
AttributeCollection(attribute_state);
}
- enabled = ViewState.GetBool("Enabled", true);
+ enabled = ViewState.GetBool ("Enabled", enabled);
}
#if NET_2_0
Modified: trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/ChangeLog
2007-11-07 16:24:21 UTC (rev 89119)
+++ trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/ChangeLog
2007-11-07 16:36:02 UTC (rev 89120)
@@ -1,3 +1,8 @@
+2007-11-07 Igor Zelmanovich <[EMAIL PROTECTED]>
+
+ * WebControlTest.cs:
+ Added new test.
+
2007-11-06 Igor Zelmanovich <[EMAIL PROTECTED]>
* ListControlTest.cs:
Modified:
trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/WebControlTest.cs
===================================================================
--- trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/WebControlTest.cs
2007-11-07 16:24:21 UTC (rev 89119)
+++ trunk/mcs/class/System.Web/Test/System.Web.UI.WebControls/WebControlTest.cs
2007-11-07 16:36:02 UTC (rev 89120)
@@ -642,6 +642,19 @@
}
[Test]
+ public void EnabledViewState2 () {
+ WebControlTestClass c = new WebControlTestClass ();
+ c.Enabled = false;
+ c.SetTrackingVS ();
+ c.Width = 100; // to cause saveviewstate return not null
+ object o = c.Save ();
+ c = new WebControlTestClass ();
+ c.Enabled = false;
+ c.Load (o);
+ Assert.IsFalse (c.Enabled, "not enabled");
+ }
+
+ [Test]
public void AttributeIsCaseInsensitive ()
{
WebControlTestClass c = new WebControlTestClass ();
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches