Sto cercando di utilizzare Html.RenderPartial in acsx lima e sto ottenendo un errore:Utilizzando Html.RenderPartial() nel file ascx
Compiler Error Message: CS1973: 'System.Web.Mvc.HtmlHelper' has no applicable method named 'RenderPartial' 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
<a href="/projects/<%=project.Id %>">
<% Html.Label("fdf"); %>
<% Html.RenderPartial("ProjectName", Model.Id); %></a></li>
<%} %>
Tuttavia ho importazione namespace neccessary , quindi non sarà errore in
<% Html.Label("fdf"); %>
ci sono metodi da utilizzare nel file di Html.RenderPartial ascx?
+1 Risolto il problema anche io! Grazie! – Rob
@Rob, se mai si passa a Razor, prendere in considerazione l'uso di questo: http://stackoverflow.com/questions/4047543/render-partial-view-with-dynamic-model-in-razor-view-engine-and-asp -net-mvc-3/5357049 # 5357049 – juan