1 Answers
0
0
you are talking about @HTML or HTML attributes
When using this code:
@Html.LabelFor(m => m.Email, new { @class = "col-md-2 control-label" }) The application will use this method in the "System.Web.Mvc"-namespace. And here is the second parameter the htmlAttributes. This is a attribute with the IDictionary type. You can here enter any HTML-attribute and set the value.
Example:
@Html.LabelFor(m => m.Email, new { @class = "SmallInput", value = "someValue", data_validationType = "email" }) Will result in the following HTML-code:
<label class="SmallInput" for="Email" value="someValue" data-validataionType="email">SomeEmailLabelText</label>
