I am trying to render a simple view with the TinyWeb framework and Spark view engine.
Enviroment is Visual Studio 2011 developer preview & .net 4.5
Rendering a template with no model binding works fine. However when I bind a model then it no longer works.
I get this error: The name 'Model' does not exist in the current context.
Handler:
public class IndexHandler
{
Route route = new Route("/");
public IResult Get()
{
var model = new { message = "Hello World" };
return View.Spark(model, "Views/base.spark");
}
}
View:
<html>
<head>
<title>This is a test</title>
</head>
<body>
<p>${Model.message}</p>
</body>
</html>