Namespace not found in MVC 3 Razor view

后端 未结 9 1241
情话喂你
情话喂你 2021-01-04 20:29

I am adding a PagedList to my view and loosely following this Tutorial. I have installed the PagedList reference using Nuget, set up my controller as follows



        
9条回答
  •  梦谈多话
    2021-01-04 21:33

    I needed to add the namespace to the Views web.config file.

    Details are in this SO post:

    I then needed to close/re-open Visual Studio 2010 in order for it to recognize. Compiling the project didn't help (the web.config might only be read once upon project load).

提交回复
热议问题