Antaris / RazorEngine

Open source templating engine based on Microsoft's Razor parsing engine
http://antaris.github.io/RazorEngine
Other
2.14k stars 577 forks source link

Layout cannot reference model #9

Closed drch- closed 12 years ago

drch- commented 12 years ago

See: https://gist.github.com/1402784

Result: Unhandled Exception: RazorEngine.Templating.TemplateCompilationException: Unable to compile template. The name 'Model' does not exist in the current context

The model does not seem to be passed to the layout as it is choking on the name 'Model'.

What is the correct way to reference the model from a Layout page?

drch- commented 12 years ago

Fixed in release3.0 branch by #6