I'm trying to render a plain html view using Spark and MVC but I obtain the following error:
The view 'Principal.html' or its master could not be found. The following locations were searched:
~/Views/Site/Principal.html.aspx
~/Views/Site/Principal.html.ascx
~/Views/Shared/Principal.html.aspx
~/Views/Shared/Principal.html.ascx
Site\Principal.html.spark
Shared\Principal.html.spark
In my controller i have:
public ViewResult Principal()
{
return View("Principal.html");
}
I register the spark engina in my Global.asax, Start method
protected override void Start()
{
...
RegisterViewEngine(ViewEngines.Engines, RouteTable.Routes);
RegisterRoutes(RouteTable.Routes);
}
private void RegisterViewEngine(ViewEngineCollection engines, RouteCollection routes)
{
SparkViewFactory engine = new SparkViewFactory();
RegisterFactory.DefaultRegister(IoCService.MyContainer, engine, routes);
engines.Add(engine);
}
How can I indicate that the page to render is html (Principal.html) and NOT spark extension?
Thanks in advance!