Create first simple MVC application

First of all, open a Visual Studio 2013 for Web and click on a New Project link in the Start page. Alternatively, you can also select File menu -> New Project.

Create first simple MVC application

From the New Project dialog as shown below, expand Visual C# node and select Web in the left pane, and then select ASP.NET Web Application in the middle pane. Name your project MVC-BasicTutorials. (You can give any appropriate name for your application). Also, you can change the location of the MVC application by clicking on Browse.. button. Finally, click OK.

Create first simple MVC application

From the New ASP.NET Project dialog, select MVC as shown below.

Create first simple MVC application
Add caption

You can also change the authentication by clicking on Change Authentication button. You can select appropriate authentication mode for your application. Here, we are not going to have any authentication for our application. So select No Authentication radio button and click OK. (By default, Individual User Accounts would be selected to authenticate users stored in SQL Server database.)

Create first simple MVC application

Wait for some time till Visual Studio creates a simple MVC project using default template as shown below.

Create first simple MVC application

Now, press F5 to run the project in debug mode or Ctrl + F5 to run the project without debugging. It will open home page in the browser as shown below.


Create first simple MVC application


MVC 5 project includes JavaScript and CSS files of bootstrap 3.0 by default. So you can create responsive web pages. This responsive UI will change its look and feel based on the screen size of the different devices. For example, top menu bar will be changed in the mobile devices as shown below.

No comments:

Powered by Blogger.