开发者

Missing model class when adding a view in ASP.NET MVC 3

In my ASP.NET MVC 3 project i have a reference to my DomainModel project.

Th开发者_JS百科e problem occurs when i try to create a strongly-typed view. In the model class list my models from the DomainModel doesn't exist.

I did the try the following with no success(From another thread):

-remove reference to the library containing the model
-clean project
-close VS
-reopen VS
-rebuild project (VS throws errors)
-re-add reference to the model library
-rebuild project

I also tried to update VS2010 to VS2010 SP1 same problem.

Any suggestion?


Well if you cannot see the model in the dialog box try to directlly call it from the view like this:

@model  IEnumerable<Ieagle.WebSelfCare.Models.InvoicingIndex>

In case you have an IEnumerable Model otherwise

@model Ieagle.WebSelfCare.Models.Person

If you cant reach your models like this than you may have problems within the models

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜