How to add a new line into Display Attribute, Name field

前端 未结 2 1426
忘了有多久
忘了有多久 2021-01-25 17:47

I\'m working on an MVC3 application and am using data attributes for the display name fields on the screen. Below is a representative sample -

    [Required]
           


        
2条回答
  •  死守一世寂寞
    2021-01-25 18:26

    Just adding to @Darin-Dimitrov answer, it is important to use

    @Html.Raw(your.property)
    

    Instead of typical HTML helpers like

    @Html.DisplayFor(modelItem=>item.property) -- will not work
    

提交回复
热议问题