I 开发者_C百科am having a problem in a project while running it it causes an exception :
The view at '~/Views/Employee/Index.aspx' must derive from ViewPage, ViewPage, ViewUserControl, or ViewUserControl.
I think it is caused as this project is in mvc 2.0 and i am having running it using mvc 3.0 but i am not getting it right. Does anyone know about this problem.
Any help will be highly appreciated..
It's to do with the content in your Inherits tag.
A standard view should have a tag similar to this at the top.
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage <OBJECT PASSED IN> " %>
I got the solution. My project is created in MVC 2 with visual studio 2008 and on opening it in MVC 3 with visual studio 2010 desn't load the project correctly for this the installation of MVC 2 with visual studio 2008 is needed.
精彩评论