我有一个HTML.TextBoxFor,它预先填充了System.Collections.Generic.List`1 [System.String]
我尝试添加一个null属性并清空“”但这只会引发错误。我怎么能加载和空文本框。
@foreach (var item in pendingReg.PaymentOptions.RegistrationPaymentTypes)
{
@Html.RadioButtonFor(m => Model.PendingRegistrations.Cart[i].PaymentOptions.PaymentTypes, item.RegistrationTypePaymentTypeID, new { data_val = item.PaymentTypeID })
<span>@item.PaymentName</span>
<br />
if (item.PaymentTypeID == 4)
{
@Html.TextBoxFor(model => Model.PendingRegistrations.Cart[i].PaymentOptions.PurchaseOrders, null, new { @class = "textboxClass", @value=""})
}
}