views:

36

answers:

1

I dont know where is my problem to access EntryList in ViewData.

  <%= Html.RenderPartial("LogOnControl", new NISE.Web.TestForum.Views.Shared.PaginationViewData()
  {
      PageIndex = ViewData.*EntryList*.PageIndex,
      TotalPages = ViewData.*EntryList*.TotalPages,
      PageActionLink = Url.Action("List","Entry", new { category = ViewData.Category, page = "{page}"}),
      TotalCount = ViewData.*EntryList*.TotalCount,
      PageSize = ViewData.*EntryList*.PageSize
  }, null)%>

I did everything like here

but it doesnt works... :(

+1  A: 

One of the comments posted on the blog entry you linked to says:

I’m trying with MVC Preview 3 but at the view form the system do not find ViewData.EntryList. Where is it?

The answer was:

You need a strongly typed ViewData class – EntryList is just a sample property in this ViewDataClass. Here is a nice blogpost about strongly typed ViewData classes: http://blog.codeville.net/2008/02/21/aspnet-mvc-making-strongly-typed-viewpages-more-easily/

Timwi