7
renderpartial con modello null ottiene il tipo sbagliato
Ho una pagina: <%@ Page Inherits="System.Web.Mvc.View<DTOSearchResults>" %> E su di esso, il seguente: <% Html.RenderPartial("TaskList", Model.Tasks); %> Ecco l'oggetto DTO: public class DTOSearchResults { public string SearchTerm { get; set; } public IEnumerable<Task> Tasks { get; set; } ed ecco il parziale: <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<Task>>" %> Quando Model.Tasks non …