"
 
 
 
ASP.NET (snapshot 2017) Microsoft documentation and samples

Get Started with ASP.NET Core

[!NOTE] These instructions are for the latest version of ASP.NET Core. Looking to get started with an earlier version? See (xref:)the 1.1 version of this tutorial.

  1. Install .NET Core.

  2. Create a new .NET Core project.

    On macOS and Linux, open a terminal window. On Windows, open a command prompt.

    dotnet new razor -o aspnetcoreapp
  3. Run the app.

    Use the following commands to run the app:

    cd aspnetcoreapp
    dotnet run
  4. Browse to http://localhost:5000

  5. Open Pages/About.cshtml and modify the page to display the message “Hello, world! The time on the server is @DateTime.Now”:

    [!code-htmlMain]

       1:  @page
       2:  @model AboutModel
       3:  @{
       4:      ViewData["Title"] = "About";
       5:  }
       6:  <h2>@ViewData["Title"]</h2>
       7:  <h3>@Model.Message</h3>
       8:   
       9:  <p>Hello, world! The time on the server is @DateTime.Now</p>

  6. Browse to http://localhost:5000/About and verify the changes.

Next steps

For getting-started tutorials, see ASP.NET Core Tutorials

For an introduction to ASP.NET Core concepts and architecture, see ASP.NET Core Introduction and ASP.NET Core Fundamentals.

An ASP.NET Core app can use the .NET Core or .NET Framework Base Class Library and runtime. For more information, see Choosing between .NET Core and .NET Framework.





Comments ( )
<00>  <01>  <02>  <03>  <04>  <05>  <06>  <07>  <08>  <09>  <10>  <11>  <12>  <13>  <14>  <15>  <16>  <17>  <18>  <19>  <20>  <21>  <22>  <23
Link to this page: //www.vb-net.com/AspNet-DocAndSamples-2017/aspnetcore/getting-started.htm
<SITEMAP>  <MVC>  <ASP>  <NET>  <DATA>  <KIOSK>  <FLEX>  <SQL>  <NOTES>  <LINUX>  <MONO>  <FREEWARE>  <DOCS>  <ENG>  <CHAT ME>  <ABOUT ME>  < THANKS ME>