ASP.NET MVC Baffling RunTime Error

The following code:

<% foreach (var product  in ViewData.Model) { %>
        <%= Html.RenderPartial("~/Views/Shared/ProductSummary.ascx",product)%>
    <% } %>

      

Throws an httpCompileException with the following detail:

Best overloaded method match for 'System.IO.TextWriter.Write (char)' has some invalid arguments

I confess that I was puzzled, confused, even confused. Where did I go astray? I don't get any errors, red squigglies, nothing, until runtime.

+1


source to share


1 answer


Found my error, I need to remove the equal sign before calling. Silly rabbit.



+1


source







All Articles