asp.net mvc - What is the difference between Html.Label and Html.Display? -
what difference between html.label , html.display?
html.label() renders html markup <label /> can used model entity's attrubute.
for eg,
<%= html.label("full name", model.fullname) %> would render
<label for="fullname">full name </label> html.display() on other hand renders html markup entire entity based on specified templates. eg. if have person entity multiple attributes, define template markup how render person , html.display() uses template render person objects across views. phil haack has excellent post on display templates.
Comments
Post a Comment