Wednesday, 14 August 2013

Add a new view to controller

Add a new view to controller

My question will probably sounds dumb to most of you but I have been
struggling to find out the problem. I basically have a method and a view
(created by right click-> Add View).
This is my method:
public ActionResult yearlyOverview(FormCollection values)
{
return View();
}
And this is my view:
<%@ Page Title="" Language="C#"
MasterPageFile="~/Views/Shared/Site.Master"
Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent"
runat="server">
yearlyOverview
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<h2>yearlyOverview</h2>

The error message that I get comes from the browser:
Sys.ArgumentException: Sys.ArgumentException: Cannot deserialize. The data
does not correspond to valid JSON. Parameter name: data
Has anybody already stumbled on this problem?

No comments:

Post a Comment