in my controller I am generating book list from a third party service and return View (list)
problem 1. I get error MemberIsLoggedOn() is not list on Umbraco error.
if i take that if condition off to check my book listing
problem 2 I get error
the model item passed into the dictionary is of type 'myCodeProject.Models.bookModel', but this dictionary requires a model item of type 'System.Collections.Generic.IEnumerable`1[myCodeProject.Models.bookModel]'.
that mean to use @model in my partial view I cannot call macropartial to render my view
not sure I am trying to aproach some this wrong here , I cannot add view to template other wise i'll end up with adding too many templates .
I have noticed that when you call partial view from macro surfacecontroller not hit the Index() method either.
how to use @model in partial view and return list from controller to view
hi all,
ok what I am trying to achieve here is generate a list of objects and return to view like return View(list); list is List
Then in view I wanted to display this in table /grid but I have few problems
then in macro partial I am calling my partial view - as i don't want to create template for each feature
in my controller I am generating book list from a third party service and return View (list)
problem 1. I get error MemberIsLoggedOn() is not list on Umbraco error. if i take that if condition off to check my book listing
problem 2 I get error
the model item passed into the dictionary is of type 'myCodeProject.Models.bookModel', but this dictionary requires a model item of type 'System.Collections.Generic.IEnumerable`1[myCodeProject.Models.bookModel]'.
that mean to use @model in my partial view I cannot call macropartial to render my view
not sure I am trying to aproach some this wrong here , I cannot add view to template other wise i'll end up with adding too many templates .
I have noticed that when you call partial view from macro surfacecontroller not hit the Index() method either.
I'm not sure about problem 1. To resolve problem 2 you need to pass an IEnumable/List into your view.
is working on a reply...