html.label

Html.Label to display email address

妖精的绣舞 提交于 2019-11-27 06:56:27
问题 I am using Html.Label to display some data in my MVC applilcation. When I am trying to display email address it does not render properly Model.CopyToEmail = lab@gmail.com @Html.Label((string)(Model.CopyToEmail)) but the rendered output that i see is com Could anyone please suggest how to display using Html.Label lab@gmail.com 回答1: Html.Label takes a field to display a <label> tag for. It's reading your string as a nested property, and printing the name of the innermost property. You just want