-1
私はTextBoxFor必須にしたい、私は値カスタム検証ヘルプ(MVC誰にでもできる)
- 現金
- マネーオーダー とDropDownListFor
@Html.DropDownListFor(model => model.Payment)
ていると私はTextBoxFor@Html.TextBoxFor(model => model.PaymentType)
持っているユーザーのみを選択し、お金のためであればDropDownListForから、私はMVC確実なを持っていると私はここRequiredIf
を使用しようとしていた私のViewModelは
ですpublic string PaymentType { get; set; }
public string Payment{ get; set; }
ショー[RequiredIf( "支払い==マネーオーダー"] ' –
'を試してみましたが、 "money order")] ' – Mhmd
あなたの助け:( – Mhmd