Estoy intentando utilizar Html.RenderPartial en acsx archivo y estoy recibiendo un error:Html.RenderPartial() en los archivos 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>
<%} %>
Sin embargo he de importación espacios de nombres neccessary , por lo que no será de error en
<% Html.Label("fdf"); %>
¿existen métodos para utilizar Html.RenderPartial en ascx?
+1 ¡Resolvió mi problema también! ¡Gracias! – Rob
@Rob, si alguna vez cambia a Razor, considere usar esto: http://stackoverflow.com/questions/4047543/render-partial-view-with-dynamic-model-in-razor-view-engine-and-asp -net-mvc-3/5357049 # 5357049 – juan