Author: igorz
Date: 2007-03-01 08:08:04 -0500 (Thu, 01 Mar 2007)
New Revision: 73586

Modified:
   trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
   trunk/mcs/class/System.Web/System.Web.UI.WebControls/Parameter.cs
   trunk/mcs/class/System.Web/System.Web.UI.WebControls/ParameterCollection.cs
Log:
2007-03-01 Igor Zelmanovich <[EMAIL PROTECTED]>

        * Parameter.cs:
        * ParameterCollection.cs:       
        fixed GetValue/s  and UpdateValue/s. 



Modified: trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog      
2007-03-01 11:33:24 UTC (rev 73585)
+++ trunk/mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog      
2007-03-01 13:08:04 UTC (rev 73586)
@@ -1,3 +1,9 @@
+2007-03-01 Igor Zelmanovich <[EMAIL PROTECTED]>
+
+       * Parameter.cs:
+       * ParameterCollection.cs:       
+       fixed GetValue/s  and UpdateValue/s. 
+
 2007-02-28 Igor Zelmanovich <[EMAIL PROTECTED]>
 
        * TreeNodeCollection.cs:

Modified: trunk/mcs/class/System.Web/System.Web.UI.WebControls/Parameter.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI.WebControls/Parameter.cs   
2007-03-01 11:33:24 UTC (rev 73585)
+++ trunk/mcs/class/System.Web/System.Web.UI.WebControls/Parameter.cs   
2007-03-01 13:08:04 UTC (rev 73586)
@@ -247,21 +247,29 @@
                {
                        return null;
                }
-               
-               internal object GetValue (HttpContext context, Control control)
+
+               internal void UpdateValue (HttpContext context, Control control)
                {
                        object oldValue = ViewState ["ParameterValue"];
-                       
-                       object newValue = ConvertValue (Evaluate (context, 
control));
-                       if (newValue == null)
-                               newValue = ConvertValue (DefaultValue);
 
+                       object newValue = Evaluate (context, control);
+
                        if (!object.Equals (oldValue, newValue)) {
                                ViewState ["ParameterValue"] = newValue;
                                OnParameterChanged ();
                        }
-                       return newValue;
                }
+
+               internal object GetValue (HttpContext context, Control control)
+               {
+                       UpdateValue (context, control);
+
+                       object value = ConvertValue (ViewState 
["ParameterValue"]);
+                       if (value == null)
+                               value = ConvertValue (DefaultValue);
+
+                       return value;
+               }
                
                internal object ConvertValue (object val)
                {

Modified: 
trunk/mcs/class/System.Web/System.Web.UI.WebControls/ParameterCollection.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI.WebControls/ParameterCollection.cs 
2007-03-01 11:33:24 UTC (rev 73585)
+++ trunk/mcs/class/System.Web/System.Web.UI.WebControls/ParameterCollection.cs 
2007-03-01 13:08:04 UTC (rev 73586)
@@ -105,8 +105,8 @@
                
                public void UpdateValues (HttpContext context, Control control)
                {
-                       foreach (Parameter param in this)
-                               param.GetValue (context, control);
+                       foreach (Parameter param in this)
+                               param.UpdateValue (context, control);
                }
                
                public void Insert (int idx, Parameter param)

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to