Ad

Search This Blog

Wednesday, December 28, 2022

Getting started with ASP.NET MVC 5

MSDotnet Stack

Getting Started with ASP.NET MVC 5 Index

Get started

Create your first app

On the Start page, select New Project. In the New project dialog box, select the Visual C# category on the left, then Web, and then select the ASP.NET Web Application (.NET Framework) project template. Name your project "MvcMovie" and then choose OK.
In the New ASP.NET Web Application dialog, choose MVC and then choose OK.
Visual Studio used a default template for the ASP.NET MVC project you just created, so you have a working application right now without doing anything! This is a simple "Hello World!" project, and it's a good place to start your application.
Press F5 to start debugging. When you press F5, Visual Studio starts IIS Express and runs your web app. Visual Studio then launches a browser and opens the application's home page. Notice that the address bar of the browser says localhost:port# and not something like example.com. That's because localhost always points to your own local computer, which in this case is running the application you just built. When Visual Studio runs a web project, a random port is used for the web server. In the image below, the port number is 1234. When you run the application, you'll see a different port number.
Visual Studio used a default template for the ASP.NET MVC project you just created, so you have a working application right now without doing anything! This is a simple "Hello World!" project, and it's a good place to start your application.
Right out of the box this default template gives you Home, Contact, and About pages. The image below doesn't show the Home, About, and Contact links. Depending on the size of your browser window, you might need to click the navigation icon to see these links.
All source collected from https://learn.microsoft.com/en-us/ef/core/

No comments:

Post a Comment