I'm reading a blog on how to add MVC functionalities to an existing WebForm application. I've created a WebForm Application. To proceed further, I need to add a number of references to assemblies.
I've been able to add them all, but the System.Web.MVC. There's no such assembly in the Add Reference Dialog box. But, the sample code that I downloaded contains a reference to that assembly.
Any how to overcome that problem?
Mvc Namespace | Microsoft Learn. This browser is no longer supported. Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
To add a Web reference to a project. In Solution Explorer, right-click the name of the project to add the Web service to and then click Add Web Reference. The Add Web Reference dialog box is displayed. In the URL box, enter the URL of the Web service to use.
The System. Web. Mvc namespace contains classes and interfaces that support the ASP.NET Model View Controller (MVC) framework for creating Web applications. This namespace includes classes that represent controllers, controller factories, action results, views, partial view, model binders, and much more.
Depending on the version of Visual Studio you are using, the MVC framework may not automatically be installed on your computer.
Check here to make sure you have the latest MVC installed
Additional suggestions:
When you go to Project->Add Reference make sure you wait for the list to fully populate and then click the System Component column header (the list is not alphabetized by default). System.Web.MVC should show up between System.Web.Mobile and System.Web.RegularExpression. You will not find System.Web.MVC there if you do not sort the column (even when you reopen the reference list).
If that still does not solve the problem then I would suggest a reinstall or simply dl MVC 3 if it isn't already installed (only MVC 2 will be installed by default) and that should add the System.Web.MVC to your references.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With