General discussion
In design patterns, MVCs do not know about each other. They can be connected together by the concept of a representation that collects several partial representations, but even then partial ones do not know about each other. This concept is true for ASP.NET MVC. Mike Brind describes Partial and ViewData well in his post Partial ASP.NET MVC views and strongly typed custom view models .
Specific to your question
To answer your question, a partial view may have a link to the action of the controller, which displays a different view if the relevant information is passed to the controller. How you do this will depend on what you are trying to do.
Given your question, I'm going to suggest that the partial view of SEARCH is a simple form with a search field and a button. So far, SEARCHRESULTS is a list of returned data. In this case, you will create an action with the SEARCH controller that takes a string value and returns only a partial SEARCHRESULTS expression or a view containing a partial SEARCHRESULTS expression. Scott Guthrie gives a pretty good description of data transfer in the form of his blog post Transfer ViewData from controllers to Views .
// returning partial public ActionResult Search(string q) { //do search ....... //................. return PartialView("SEARCHREULTS", viewdata); }
ahsteele
source share