As you know we can set attributes to actionLink or textBox in razor views but how can we set attributes to @Html.EditorFor
, I know the EditorFor is a dynamic element that can be set according to model type, but all shapes of that can get the attributes. So is there any way to set attribute to @Html.EditorFor
something like this: new {@class = "myclass"}
?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…