In MVC, is it possible to share a view across multiple controllers?
sumank
Yes.Mention the view full path in the View method.public class UserController : Controller {public ActionResult ShowUser(){return View();} } public class AccountController : Controller {public ActionResult ShowAccount(){return View("~/Views/User/ShowUser.cshtml");} }
Yes, It is possible to share a view across multiple controllers by putting a view into the shared folder. By doing like this, you can automatically make the view available across multiple controllers.