How to change the display name for LabelFor in razor in mvc3?

前端 未结 5 1942
日久生厌
日久生厌 2021-01-30 15:22

In razor engine I have used LabelFor helper method to display the name

But the display name is seems to be not good to display. so i need to change my displ

5条回答
  •  花落未央
    2021-01-30 16:02

    You can change the labels' text by adorning the property with the DisplayName attribute.

    [DisplayName("Someking Status")]
    public string SomekingStatus { get; set; }
    

    Or, you could write the raw HTML explicitly:

    
    

提交回复
热议问题