views:

16

answers:

1

I'm building a search engine for documents using asp.net mvc. The results of the search are two different IList collections (One for the people matched and one for the documents matched with the search parameters). I put these collections in a class and return the class to the view. The view uses HTML.RenderPartial() to bind the respective collection to its own user control. I want to page each of those collections independently. How do I create an action method to change the page of each individual collection without having to rebind the values for the other collection? (Both collections are displayed on the same page).

A: 
public ActionResult Search(int pagePeople, int pageDocuments)

Alternatively, you can use the new Html.Action (take a look here). I don't exactly understand of what you have or what you want. Try giving me more info.

Trimack
What is the difference between renderaction and renderpartial?
Cptcecil
The difference is, that RenderPartial generates the portion of the view based on data gotten from the Action, that generates the entire response, while RenderAction is used to call another action to generate the part of the response. Actually, this is, I think, what you want.
Trimack