简体   繁体   中英

Learning MVC and C# with the IController interface

I'm a 2nd year computer science student and have worked with Java during the entire course of the education so far. I'm now trying to play with C# to learn more about it by making a small program using the MVC structure following this tutorial:

http://www.codeproject.com/Articles/25057/Simple-Example-of-MVC-Model-View-Controller-Design

I'm using his basic structure (fitted to match my own neéds of course) but I'm having trouble understanding the IController interface? Visual studio don't seem to recognize the existence of this interface, even if I type in the path manually in the imports?

What am I missing? Why can't I use the IController interface in Visual Studio 2013? I see the documentation is there on microsofts page so it should exist.. I feel like I'm missing something ridicolously obvious?

You need to add "using System.Web.Mvc" to the top of your file.

And also:

Go to your menu: Project > Add Reference... > Browse.

Then browse to C:\\Program Files (x86)\\Microsoft ASP.NET\\ASP.NET MVC 4\\Assemblies

Pick the latest version of MVC in the ASP.NET folder (or whichever one you want to use).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM