Hướng dẫn học mvc asp.net để làm dự án
Hãy nâng cấp lên Microsoft Edge để tận dụng các tính năng mới nhất, bản cập nhật bảo mật và hỗ trợ kỹ thuật. Get started with ASP.NET Core MVC
Trong bài viết nàyBy Rick Anderson This tutorial teaches ASP.NET Core MVC web development with controllers and views. If you're new to ASP.NET Core web development, consider the Razor Pages version of this tutorial, which provides an easier starting point. See Choose an ASP.NET Core UI, which compares Razor Pages, MVC, and Blazor for UI development. This is the first tutorial of a series that teaches ASP.NET Core MVC web development with controllers and views. At the end of the series, you'll have an app that manages and displays movie data. You learn how to:
View or download sample code (). Prerequisites
The Visual Studio Code instructions use the .NET CLI for ASP.NET Core development functions such as project creation. You can follow these instructions on macOS, Linux, or Windows and with any code editor. Minor changes may be required if you use something other than Visual Studio Code.
Create a web app
For more information, including alternative approaches to create the project, see Create a new project in Visual Studio. Visual Studio uses the default project template for the created MVC project. The created project:
The tutorial assumes familiarity with VS Code. For more information, see Getting started with VS Code and .
Visual Studio Code might display a dialog box that asks: Do you trust the authors of the files in this folder?
Visual Studio Code adds a
7 folder with generated
8 and
9 files.
Run the app
Visual Studio runs the app and opens the default browser. The address bar shows
3 and not something like
3. The standard hostname for your local computer is
4. When Visual Studio creates a web project, a random port is used for the web server. When you run the app, you'll see a different port number. |