6
Ho la seguente rasoio markup:rendering Html.Hidden helper con valore personalizzato
@{
var initValue = @Html.Raw(new JavaScriptSerializer().Serialize(Model));
@Html.Hidden("initial-namings-data", initValue.ToString());
}
Mi dà errore:
'System.Web.Mvc.HtmlHelper' has no applicable method named 'Hidden' but appears to have an extension method by that name. Extension methods cannot be dynamically dispatched. Consider casting the dynamic arguments or calling the extension method without the extension method syntax.
Come posso risolvere il problema? Grazie.
Qual è il tipo di 'model'? dinamico? – nemesv
Sì, il modello della vista non è fortemente digitato. –