I created an ASP.NET MVC 2 project with a model. I then created a view and selected for it to be strongly-typed for the model that was created. I also did the same thing with a partial view. In either case for some reason I am getting the error: "Cannot resolve symbol 'Html' whenever I try to use the Html helper methods that ASP.NET MVC 2 provides for creating form elements for the model. I have Visual Studio 2010 and ASP.NET MVC 2 installed. Is this something that has been seen before? If so, is there a solution that will resolve this?
My model looks like:
public namespace MyNamespace { public class MyModel { public string MyProperty { get; set; } } }
The first line of my regular view is:
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<MyNamespace.MyModel>" %>
The first line of my partial view is:
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<MyNamespace.MyModel>" %>