I am trying to call a Json.Encode(...)
method in MVC 4 and I\'m getting an error: The name \'Json\' does not exist in the current context.
Apparently if you create a new empty web project, and try and move everything into Areas, it removes the Helpers library. But if you create it as an internet project, they remain. I created a new project as an internet project and everything works now.
And now @Json.Encode should work.
Update
To be clear, even after you add the correct reference to your project, you still have to add this line at the top of your Razor page:
@using System.Web.Helpers;