Utilizzando MVC 4 creo una casella di testo per una proprietà modello con il "-messaggio di dati" attributo:ASP.NET MVC Aggiunta attributo "data-messaggio" a Html.TextBoxFor
@Html.TextBoxFor(o => o.TradeOrder.Symbol, new {data-message="Required"})
Tuttavia, ottengo il seguente errore:
Invalid anonymous type member declarator. Anonymous type members must be declared with a member assignment, simple name or member access.
questo è un collegamento con ulteriori informazioni http://stackoverflow.com/questions/2520487/how-to-use-html-5-data-attributes-in-asp-net-mvc –