ASP.NET MVC Strongly Typed Partial View, gives could not load type error

Posted by Matt on Stack Overflow See other posts from Stack Overflow or by Matt
Published on 2010-03-17T18:26:24Z Indexed on 2010/03/17 18:31 UTC
Read the original article Hit count: 752

I am attempting to create a strongly typed view with a "MVC View User Control" that is being rendered using Html.RenderPartial(). The top of my ascx file looks like this:

<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<System.Collections.IEnumerable<string>>" %>

There is nothing else on this page, currently.

When I execute the app and load the page that renders this control, I get the following error:

 Could not load type 'System.Web.Mvc.ViewUserControl<System.Collections.IEnumerable<string>>'.

So, then I simplified it:

<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<String>" %>

And then, just in case it needed to be fully qualified:

<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<System.String>" %>

Everytime I get the same error (substituting type). what am I doing wrong here? I'm on .NET 3.5 with ASP.NET MVC 1.0 RTM.

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about partial-views