I have the following structure:
Site.Master
Home - View
HomeController - Controller
In the Site.Master I have a header that contains several ActionLinks, one of which is a Faq. In the Home view I have HTML that essentially displays static content, but, in the center pane/div I want to have dynamic content, based on certain HTML.ActionLinks that the user clicks on. So, for example, initially, I want the center DIV to display an intro - but if the user clicks on my Faq ActionLink, I want the center DIV to display content specific to my Faq.
In the HomeController I have the following:
[HttpGet]
public ActionResult Intro()
{
var introRequest = _gatewayService.GetContent(new GetContentRequest { Content = ContentTypes.Introduction });
ViewData["content"] = introRequest.Result;
return View();
}
[HttpGet]
public ActionResult Faq()
{
var faqRequest = _gatewayService.GetContent(new GetContentRequest { Content = ContentTypes.Faq });
ViewData["content"] = faqRequest.Result;
return View();
}
The idea would be that the action link for Faq would look something like:
<%= Html.ActionLink("Faq","Faq","Home") %>