Selaa lähdekoodia

Fixed ControlPropertiesValid().

svn path=/trunk/mcs/; revision=21673
Alon Gazit 22 vuotta sitten
vanhempi
sitoutus
62b4589782

+ 3 - 0
mcs/class/System.Web/System.Web.UI.WebControls/ChangeLog

@@ -1,3 +1,6 @@
+2004-01-04 Alon Gazit <[email protected]>
+	* RangeValidator.cs: Fixed ControlPropertiesValid().
+	
 2004-01-03  Gonzalo Paniagua Javier <[email protected]>
 
 	* Xml.cs: mono-stylized and removed warnings.

+ 2 - 2
mcs/class/System.Web/System.Web.UI.WebControls/RangeValidator.cs

@@ -86,7 +86,7 @@ namespace System.Web.UI.WebControls
 				fmt[3] = PropertyConverter.EnumToString(typeof(ValidationDataType), Type);
 				throw new HttpException(HttpRuntime.FormatResourceString("Validator_value_bad_type", fmt));
 			}
-			string min = MaximumValue;
+			string min = MinimumValue;
 			if(!CanConvert(min, Type))
 			{
 				string[] fmt = new string[4];
@@ -97,7 +97,7 @@ namespace System.Web.UI.WebControls
 				throw new HttpException(HttpRuntime.FormatResourceString("Validator_value_bad_type", fmt));
 			}
 
-			if(Compare(max, min, ValidationCompareOperator.GreaterThan, ValidationDataType.Double))
+			if(Compare(min,max,  ValidationCompareOperator.GreaterThan, Type))
 			{
 				string[] fmt = new string[3];
 				fmt[0] = min;