void Clearengine ()
{
Remove the default already loaded ASPX entity engine
ViewEngines.Engines.RemoveAt (0);
Get Razor View engine
Razorviewengine razor= viewengines.engines[0] as Razorviewengine;
Modify the default location format for a zone view
string[] Areaviewlocationformats = new string[2]{
"~/areas/{2}/views/{1}/{0}.cshtml",
"~/areas/{2}/views/shared/{0}.cshtml"};
Razor. Areaviewlocationformats = Areaviewlocationformats;
Razor. Areapartialviewlocationformats = Areaviewlocationformats;
Razor. Areamasterlocationformats = Areaviewlocationformats;
Modify the View default location format
string[] Viewlocalformats = new String[2]
{
"~/views/{1}/{0}.cshtml",
"~/views/shared/{0}.cshtml"};
Razor. Viewlocationformats = Viewlocalformats;
Razor. Partialviewlocationformats = Viewlocalformats;
Razor. Masterlocationformats = Viewlocalformats;
}
----Adding this method to the gloable will only
MVC Engine Optimization