In my MVC project has 2 Areas which is Admin and Client and I need to dynamic config Layout for Client side, In _ViewStart (in client) file will set layout for all of client pag
in Views/_ViewStart.cshtml
@{ object multiTenant; if (!Request.GetOwinContext().Environment.TryGetValue("MultiTenant", out multiTenant)) { throw new ApplicationException("Could not find tenant"); } Layout = "~/Views/"+ ((Tenant)multiTenant).Name + "/Shared/_Layout.cshtml"; }