diff options
author | Igor Zelmanovich <igorz@mono-cvs.ximian.com> | 2008-01-07 17:24:43 +0300 |
---|---|---|
committer | Igor Zelmanovich <igorz@mono-cvs.ximian.com> | 2008-01-07 17:24:43 +0300 |
commit | 26024a3c367e75bc916faca534ab356279eda953 (patch) | |
tree | fc8d91fb5796ec3ffb494c396eb5574cd797afd9 /mcs/class/System.Web/System.Web.UI.WebControls/BaseCompareValidator.cs | |
parent | 0c6081520706d263235c7bddaea5383ccd61d739 (diff) |
2008-01-07 Igor Zelmanovich <igorz@mainsoft.com>
* Page.cs: added internal API
* IScriptManager.cs: added new internal interface.
2007-01-07 Igor Zelmanovich <igorz@mainsoft.com>
* BaseCompareValidator.cs:
* BaseValidator.cs:
* CompareValidator.cs:
* CustomValidator.cs:
* RangeValidator.cs:
* RegularExpressionValidator.cs:
* RequiredFieldValidator.cs:
refactoring: If page contents instance of IScriptManager, validators call
it's API instead Page.ClientScript.
svn path=/trunk/mcs/; revision=92389
Diffstat (limited to 'mcs/class/System.Web/System.Web.UI.WebControls/BaseCompareValidator.cs')
-rw-r--r-- | mcs/class/System.Web/System.Web.UI.WebControls/BaseCompareValidator.cs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/BaseCompareValidator.cs b/mcs/class/System.Web/System.Web.UI.WebControls/BaseCompareValidator.cs index a5b81fefd47..d0b12f7f331 100644 --- a/mcs/class/System.Web/System.Web.UI.WebControls/BaseCompareValidator.cs +++ b/mcs/class/System.Web/System.Web.UI.WebControls/BaseCompareValidator.cs @@ -53,22 +53,22 @@ namespace System.Web.UI.WebControls { if (RenderUplevel) { #if NET_2_0 if (Page!=null){ - Page.ClientScript.RegisterExpandoAttribute (ClientID, "type", Type.ToString ()); + RegisterExpandoAttribute (ClientID, "type", Type.ToString ()); switch (Type) { case ValidationDataType.Date: DateTimeFormatInfo dateTimeFormat = CultureInfo.CurrentCulture.DateTimeFormat; string pattern = dateTimeFormat.ShortDatePattern; string dateorder = (pattern.StartsWith ("y", true, CultureInfo.InvariantCulture) ? "ymd" : (pattern.StartsWith ("m", true, CultureInfo.InvariantCulture) ? "mdy" : "dmy")); - Page.ClientScript.RegisterExpandoAttribute (ClientID, "dateorder", dateorder); - Page.ClientScript.RegisterExpandoAttribute (ClientID, "cutoffyear", dateTimeFormat.Calendar.TwoDigitYearMax.ToString ()); + RegisterExpandoAttribute (ClientID, "dateorder", dateorder); + RegisterExpandoAttribute (ClientID, "cutoffyear", dateTimeFormat.Calendar.TwoDigitYearMax.ToString ()); break; case ValidationDataType.Currency: NumberFormatInfo numberFormat = CultureInfo.CurrentCulture.NumberFormat; - Page.ClientScript.RegisterExpandoAttribute (ClientID, "decimalchar", numberFormat.CurrencyDecimalSeparator); - Page.ClientScript.RegisterExpandoAttribute (ClientID, "groupchar", numberFormat.CurrencyGroupSeparator); - Page.ClientScript.RegisterExpandoAttribute (ClientID, "digits", numberFormat.CurrencyDecimalDigits.ToString()); - Page.ClientScript.RegisterExpandoAttribute (ClientID, "groupsize", numberFormat.CurrencyGroupSizes [0].ToString ()); + RegisterExpandoAttribute (ClientID, "decimalchar", numberFormat.CurrencyDecimalSeparator, true); + RegisterExpandoAttribute (ClientID, "groupchar", numberFormat.CurrencyGroupSeparator, true); + RegisterExpandoAttribute (ClientID, "digits", numberFormat.CurrencyDecimalDigits.ToString()); + RegisterExpandoAttribute (ClientID, "groupsize", numberFormat.CurrencyGroupSizes [0].ToString ()); break; } } |