Thursday, September 9, 2010

First MVC 2 Application with Visual Studio 2010

Creating your First MVC Application with Visual Studio 2010

Eg: Follow the following steps.

  • Create an empty MVC 2 web application.


  • Add a controller named HomeController and write the following method.
public string Index()
{
  return "My first MVC Application";
}

  • Run the application.

The above application just returns a string value. We dont have any view. The browser will display only a string.

No comments: