質問編集履歴

1

コードの誤記修正

2022/01/20 09:33

投稿

kentasuzuki_
kentasuzuki_

スコア28

test CHANGED
File without changes
test CHANGED
@@ -42,8 +42,8 @@
42
42
  protected void CustomValidator1_ServerValidate(object source,
43
43
  ServerValidateEventArgs args)
44
44
  {
45
- // テキストボックスへのユーザー入力が 200 なら検証 OK
45
+ // テキストボックスへのユーザー入力が 200 以外ならScriptを登録する
46
- if (args.Value == "200")
46
+ if (args.Value != "200")
47
47
  {
48
48
  // Scriptを登録し、aspx側に記載しているTotalMoneyCheck()関数を呼ぶ
49
49
  ScriptManager.RegisterStartupScript(this, this.GetType(), "TotalMoney", "TotalMoneyCheck();", true);
@@ -55,7 +55,7 @@
55
55
  }
56
56
 
57
57
  補足ですが、ここではMoneyTextBox.Textの値は100とします。
58
- RecalcMoney()の戻り値は200とします。
58
+
59
59
  ```
60
60
 
61
61
  ### 追加情報(FW/ツールのバージョンなど)