如何管理我的dropdownlist disabled / readOnly 这是我的代码:
foreach ( var item in Model.TranscriptData.Transcript.Where( s => s.TermNo == termItem && s.InsteadOfLessonNo == null ).ToList() )
{
@Html.DropDownList("LetterGradeValue", new SelectList(grade, "Value", "LetterGrade", string.Format("{0};{1};{2}", coefficient, letterGradeTypeId, letterGrade)), "-", new { @onchange = "ChangeValues(" + counter + ");", @class = counter })
}
答案 0 :(得分:0)
试试这个。
@Html.DropDownList("LetterGradeValue", new SelectList(grade, "Value", "LetterGrade", string.Format("{0};{1};{2}", coefficient, letterGradeTypeId, letterGrade)), "-", new { @onchange = "ChangeValues(" + counter + ")",@disabled = "disabled", @class = counter })