Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
完整的警告是 Validation (): Element 'html' 出现的次数太少
这是一个 JSON 视图,您可能会猜到它返回一个 JSON 结果,因此没有 html。
ASP.NET MVC 能够将 JSON 数据作为正确的 json 响应返回。看来您正在使用 HTTP 响应,它期望 HTML 存在于其中。
这是使用 JSON.NET 构建 JSON ActionResult的示例。
http://www.dev102.com/2008/08/19/jquery-and-the-aspnet-mvc-framework/这里也是另一个教程。