I want to make additional editor template for the Int32. In it I want to get all attributes(custom/default-data-annotations) and do some work with them:
@model Int32
@{
string propertyName = ViewData.ModelMetadata.PropertyName;
var attributes = ViewData.ModelMetadata.GetSomeHowAllTheAttributesOfTheProperty;
SomeWorkWithAttribute(attributes);
}
<input type="text" name="@propertyName" value="@ViewData.ModelMetadata.DisplayFormatString" class="form-control"/>
So the question how to get in the EditorTemplate all attributes of the property?
Thx in advance