I refer to it.
The answer to the job really works well but it does not look like using the new labels while using Assistant, the data annotation attributes for the display name name
I'm using this That code is:
Public static MvcHtmlString LabelFor & lt; TModeel, TProperty & gt; (This HtmlHelper & lt; TModeel & gt; htmlHelper, string prefix, expression & lt; Func & lt; TModel, TProperty & gt; Expression, IDictionary & lt; string, object & gt; html properties) {return htmlHelper.Label ( String.Format ("{0}. {1}", prefix, expression); }
Is there a way around this or am I going to use a normal label assistant?
I think that only DisplayFor and EditorFor (templating) extensions take dataetting attributes into account. If none of them will work out of the box for you, then you can create your own template. Instead of giving details of this, I just tell you about Brad Wilson's excellent blog posts. The option, as you guessed, is just to use the helpers typed in non-firmly.
Comments
Post a Comment