Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
テキスト ボックスの検証コントロールを使用する asp.net アプリケーションがあります。ただし、ユーザーが txtFieldA に値を入力した場合は、txtFieldB と txtFieldC の検証コントロールを無効にしたいと考えています。
このJavaScript関数を使用するだけです
function Disable() { var myVal = document.getElementById('myValidatorClientID'); ValidatorEnable(myVal, false); }
デフォルトの検証ポリシーを上書きPage.Validate()またはPage.Validate(string)変更します。
Page.Validate()
Page.Validate(string)