2

I am using the SparkViewEngine and I am calling an action that I want to return a Partial View to update just a section of the page. When I return the view on the action the masterpage and all of its content gets returned. How do you tell a partial in spark to just return the content of the partial view and not put the content inside the application.spark file??

runxc1 Bret Ferrier
  • 8,096
  • 14
  • 61
  • 100
  • BTW, here's a very similar question from a little over a month ago http://stackoverflow.com/questions/2131936/removing-master-layout-from-view-mvc2/2520319 – Roman Mar 26 '10 at 00:03

1 Answers1

6

Do you return PartialViewResult?

public PartialViewResult ActionName()
{
    return PartialView();
}

If you use PartialView(), application.spark is ignored.

LukLed
  • 31,452
  • 17
  • 82
  • 107