Razor View Engine : An expression tree may not contain a dynamic operation
It seems to me that you have an untyped view. By default, Razor views in MVC3 RC are typed as dynamic
. However, lambdas do not support dynamic members. You have to strongly type your model. At the top of your view file add
@model SampleModel
A common error that is the cause of this is when you add
@Model SampleModel
at the top of the page instead of
@model SampleModel