Dec 17, 2013 at 9:49 PM
Edited Dec 17, 2013 at 9:51 PM
I am trying to write a Web Api that will return Json Siren and Html. Using WebApiContrib its been going ok. Content comes back based on the content-type header. However when I try to use @Html in the Razor view I get the following exception.
Message=Unable to compile template. The name 'Html' does not exist in the current context
I found a stackoverflow discussion that seemed to be heading down the right road. (From a comment in the HtmlTemplateBase that I got from WebApiContrib. ) but I have tried a few things based on it with no luck. (I added the SetTemplateService in WebApiConfig)
Can anyone point me in the right direction? I suspect its something fairly obvious. I am not a full on C# dev, just getting started.
The link to the stack discussion is:
Any help will be very much appreciated even if its - go and post in another forum.