title: Call another controller and use a different Layout for the called controller action MVC ASP.NET
body: <p>Am new to MVC ASP.Net. I would like to call an action method from another controller and use a different layout page.</p>
  
  <p>My Views/Shared folder has two layout pages: ~/Views/Shared/_Layout1.cshtml and ~/Views/Shared/_Layout2.cshtml. Below is my code:</p>
  
  <pre><code>//HomeController
  public class HomeController : Controller
  {
      public ActionResult Index(string id)
      {
          if(String.IsNullOrEmpty(id))
          {
            //Call someMethod from UserController
            //And when called, it should a different Layout page: ~/Views/Shared/_Layout2.cshtml
            return View("someMethod"); 
          }
          else
          {
            return AboutPage(id); //uses ~/Views/Shared/_Layout1.cshtml
          }
       }
      public ActionResult AboutPage(string id)
      {
         return View();
      }
  
   }
  </code></pre>