Exception: An expression tree may not contain a dynamic operation
.net-4.0, c#, razor
Solution
Your View seems incorrect.
The model declaration should be lowercase 'model', not 'Model':
@model Project.Data.Organization
Problem
I found a similar question here: Razor View Engine : An expression tree may not contain a dynamic operation But I have tried the solutions and they do not solve my issue. I have a Controller with the following: ``` public ActionResult CreateOrganization(Guid parentOrganizationId) { Organization organization = new Organization(); return View(organization); } ``` And the view has the following: ``` @using Project.Data @Model Project.Data.Organization @{ ViewBag.Title = "Create new Organization"; } <hgroup class="title"> <h1>@ViewBag.Title.</h1> <h2>Use the form below to create a new Organization.</h2> </hgroup> <script src="~/Scripts/jquery.validate.min.js"></script> <script src="~/Scripts/jquery.validate.unobtrusive.min.js"></script> @using (Html.BeginForm((string)ViewBag.FormAction, "Organization")) { <fieldset> <legend>Create Organization</legend> <ol> <li> @Html.LabelFor(m=> m.Name) @Html.TextBoxFor(m=> m.Name); @Html.ValidationMessageFor(m=> m.Name) </li> </ol> <input type="submit" value="Register" /> </fieldset> } ``` Which is explicitly specifying the model (as suggested in the other post). However I am still receiving the 'An expression tree may not contain a dynamic operation' error. Have I made a stupid mistake somewhere?