如何在MVC 3中使用LabelFor

arn*_*rob 3 .net c# html-helper asp.net-mvc-3

@Html.LabelFor(model => model.updateDate)
Run Code Online (Sandbox Code Playgroud)

但这被转换为<label for="updateDate">updateDate</label>,并且值不会只显示updateDate.我该如何显示该值?

pod*_*ska 5

尝试DisplayFor而不是LabelFor

@Html.DisplayFor(model => model.updateDate) 
Run Code Online (Sandbox Code Playgroud)