チェンジセット 1641 (default)
- 日時:
- 2024/03/12 10:38:13 (7ヵ月前)
- 場所:
- framework/trunk
- ファイル:
-
- 3個の追加
- 4個の更新
凡例:
- 未変更
- 追加
- 削除
-
framework/trunk/WebApplication/UI/WebControls/CompareValidatorPage.aspx
r1632 r1641 78 78 <sff:CompareValidator runat="server" 79 79 ControlToValidate="TextBox301" 80 ValueToCompare='<%# Eval("MaxValue") %>' 81 Type="Integer" 82 Operator="LessThan" 83 Text="CompareValidator-Text-301-A" 84 ErrorMessageFormatString="CompareValidator-ErrorMessageFormatString-301-A,2=[{2}]" 85 ValidationGroup='<%# "ValidationGroup301-" + Eval("Key") %>'/> 86 <sff:CompareValidator runat="server" 87 ControlToValidate="TextBox301" 80 88 ControlNameToValidate='<%# "CompareValidator-ControlNameToValidate-301-" + Eval("Key") %>' 81 89 CompareNameToValidate='<%# "CompareValidator-CompareNameToValidate-301-" + Eval("Key") %>' … … 83 91 Type="Integer" 84 92 Operator="LessThan" 85 Text="CompareValidator-Text-301 "86 ErrorMessageFormatString="CompareValidator-ErrorMessageFormatString-301 ,0=[{0}],1=[{1}],2=[{2}]"93 Text="CompareValidator-Text-301-B" 94 ErrorMessageFormatString="CompareValidator-ErrorMessageFormatString-301-B,0=[{0}],1=[{1}],2=[{2}]" 87 95 ValidationGroup='<%# "ValidationGroup301-" + Eval("Key") %>'/> 88 96 <asp:Button runat="server" -
framework/trunk/WebApplication/WebApplication.csproj
r1635 r1641 73 73 <Content Include="UI\WebControls\FormViewPage.aspx" /> 74 74 <Content Include="UI\WebControls\RadioButtonFieldPage.aspx" /> 75 <Content Include="UI\WebControls\RangeValidatorPage.aspx" /> 75 76 <Content Include="UI\WebControls\TemplateFieldPage.aspx" /> 76 77 <Content Include="UI\WebControls\ObjectDataSourceGridViewPage.aspx" /> … … 355 356 <Compile Include="UI\WebControls\RadioButtonFieldPage.aspx.designer.cs"> 356 357 <DependentUpon>RadioButtonFieldPage.aspx</DependentUpon> 358 </Compile> 359 <Compile Include="UI\WebControls\RangeValidatorPage.aspx.cs"> 360 <DependentUpon>RangeValidatorPage.aspx</DependentUpon> 361 <SubType>ASPXCodeBehind</SubType> 362 </Compile> 363 <Compile Include="UI\WebControls\RangeValidatorPage.aspx.designer.cs"> 364 <DependentUpon>RangeValidatorPage.aspx</DependentUpon> 357 365 </Compile> 358 366 <Compile Include="UI\WebControls\TemplateFieldPage.aspx.cs"> -
framework/trunk/WebLibrary/Sources/UI/WebControls/CompareValidator.cs
r1631 r1641 64 64 65 65 /// <summary> 66 /// エラーメッセージを生成したときに使用した <see cref="System.Web.UI.WebControls.CompareValidator.ValueToCompare"/> の値。 67 /// </summary> 68 private string currentValueToCompare; 69 70 /// <summary> 66 71 /// <see cref="Control.PreRender"/> に到達しているかどうか。 67 72 /// </summary> … … 114 119 /// このプロパティが設定されると、このプロパティ値をフォーマット文字列として 115 120 /// <c>{0}</c> に <see cref="ControlNameToValidate"/>、 116 /// <c>{1}</c> に <see cref="CompareNameToValidate"/> 121 /// <c>{1}</c> に <see cref="CompareNameToValidate"/>、 122 /// <c>{2}</c> に <see cref="System.Web.UI.WebControls.CompareValidator.ValueToCompare"/> 117 123 /// が埋め込まれた値が 118 124 /// <see cref="System.Web.UI.WebControls.BaseValidator.ErrorMessage"/> が設定されます。 … … 314 320 protected virtual void EnsureErrorMessage() 315 321 { 316 if (!RequiresErrorMessage) 322 if (!RequiresErrorMessage 323 && Equals(currentValueToCompare, ValueToCompare)) 317 324 { 318 325 return; … … 335 342 } 336 343 344 string valueToCompare = ValueToCompare; 337 345 ErrorMessage 338 346 = Utility.Format( … … 340 348 ControlNameToValidate, 341 349 CompareNameToValidate, 342 ValueToCompare);350 valueToCompare); 343 351 344 352 RequiresErrorMessage = false; 353 currentValueToCompare = valueToCompare; 345 354 } 346 355 } -
framework/trunk/WebLibrary/Sources/UI/WebControls/RangeValidator.cs
r1622 r1641 58 58 59 59 /// <summary> 60 /// エラーメッセージを生成したときに使用した <see cref="System.Web.UI.WebControls.RangeValidator.MinimumValue"/> の値。 61 /// </summary> 62 private string currentMinimumValue; 63 64 /// <summary> 65 /// エラーメッセージを生成したときに使用した <see cref="System.Web.UI.WebControls.RangeValidator.MaximumValue"/> の値。 66 /// </summary> 67 private string currentMaximumValue; 68 69 /// <summary> 60 70 /// <see cref="Control.PreRender"/> に到達しているかどうか。 61 71 /// </summary> … … 278 288 protected virtual void EnsureErrorMessage() 279 289 { 280 if (!RequiresErrorMessage) 290 if (!RequiresErrorMessage 291 && Equals(currentMinimumValue, MinimumValue) 292 && Equals(currentMaximumValue, MaximumValue)) 281 293 { 282 294 return; … … 299 311 } 300 312 313 string minimumValue = MinimumValue; 314 string maximumValue = MaximumValue; 301 315 ErrorMessage 302 316 = Utility.Format( 303 317 format, 304 318 ControlNameToValidate, 305 MinimumValue,306 MaximumValue);319 minimumValue, 320 maximumValue); 307 321 308 322 RequiresErrorMessage = false; 323 currentMinimumValue = minimumValue; 324 currentMaximumValue = maximumValue; 309 325 } 310 326 }
※ 詳しい使い方は
TracChangeset を参照してください。