How to get rid of validation warnings
-
06-07-2019 - |
Question
The complete warning is Validation (): Element 'html' occurs too few times
This is for a JSON view, which you might guess returns a JSON result and hence no html.
Solution
ASP.NET MVC has the ability to return JSON data as a proper json response. It seems you're using HTTP response which expects HTML to exist in it.
Here is an example of using JSON.NET to build a JSON ActionResult.
OTHER TIPS
http://www.dev102.com/2008/08/19/jquery-and-the-aspnet-mvc-framework/ Here is another tutorial as well.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow