Some. I am launching a slightly modified version of the Nancy Web Framework hosting demo, Nancy.Demo.Hosting.Self. I changed it to include the Nancy Razor view engine, Nancy.ViewEngines.Razor. It works great when I use the basic Razor features, but I am having problems with partial views and @Render layouts.
Are these additional features supported outside of ASP.NET?
The same views I copied from Nancy.Demo.Hosting.Aspnet seem to work well there.
I get a crash about not finding my headline.
Here is the view:
@{ Layout = "razor-layout.cshtml"; } @section Header { } <h1>Hello @Model.FirstName</h1> <p>This is a sample Razor view!</p> @section Footer { <p>This is footer content!</p> }
And the layout
<html> <head> <title>Razor View Engine Demo - @Model.FirstName</title> @RenderSection("Header") </head> <body> <div id="body">@RenderBody()</div> <div id="footer">@RenderSection("Footer")</div> <div id="optional">@RenderSection("Optional", false)</div> </body> </html>
kenny source share