tags:

views:

56

answers:

1

This question is for someone who has read Professional ASP.NET MVC 1.0 (Scott Gu..) Chapter 7 AJAX. On page 286 they list the contents of the partial but do not show how to type it as IList

+4  A: 

You just need to type it as: ViewPage<IList<MyCustomClass>>

Joel Martinez
So at the top of the partial view like this:<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IList<MyCustomClass>>" %>
Danny
If you do it this way remember to put System.Collections.Generic in the namespaces section of your web.config. Or you could type it all out Inherits="System.Web.Mvc.ViewPage<System.Collections.Generic.IList<MyCustomClass>>"
David Liddle