I have two Controllers
CustomerController, CompanyController . if I need to load a view which is at View/Company, but both Customer and Company controller need to use it .. I have two ways to load it in CustomerController ..
First
public class CustomerController : Controller
{
public ActionResult Companies()
{
var companies = GetCompanies();
return View("../Company/Companies", companies);
}
}
Second
Shift the "Companies" view to View/Shared
folder and then both controller will be able to access it.
Which approach is correct and better .. which will perform faster .. etc .. please share suggestions