Sto realizzando un piccolo progetto utilizzando jQuery, MVC4 con Razon e C#. A mio avviso ho un elenco a discesa e desidero dargli l'attributo della data-url=Url.Action("UpdateDeliveryAddress", "Home")
:Dichiaratore membro di tipo anonimo non valido utilizzando l'attributo html data-url
<div class="@dropDownListClass">
@Html.DropDownList("theList", null, new {data-url=Url.Action("UpdateDeliveryAddress", "Home") })
</div>
Tuttavia, quando lo faccio, ottengo l'errore seguente:
invalid anonymous type member declarator anonymous type members must be declared with a member assignemnt, simple name or member access.
Che cosa sono io mancante? Perché ho questo errore?
Mi stai prendendo in giro lol .... Grazie! –