Is it possible to use dynamic ViewModel in default.cshtml (as per /NoModelNoController)?
I can use them in the main default.cshtml in the root of the site but if I use them in one of the other default.cshtml pages (e.g. similar to /stars/dead/joplin/default.cshtml) the value isn’t present.
I’ve used the following for test purposes:
<h1>TestVal - @Request.QueryString["Test"]</h1>
If I run RazorRockstars locally (self-hosted) with the above added to the root default.cshtml file and /joplin/default.cshtml. and hit:
http://127.0.0.1:2001/?test=foo then I see the expected “TestVal - foo”.
If I add a breakpoint within the joplin/default.cshtml I get the message
The name ‘Request’ does not exist in the current scope
Is there something additional I need to do to get this behaviour in default.cshtml?