@using MvcSample.Web.Models @model User @{ Layout = "/Views/Shared/_Layout.cshtml"; ViewBag.Title = "Home Page"; string nullValue = null; } @functions { public async Task AsyncValueRetrieval() { return "Hello World"; } public Task RenderHelloWorldPartial(User model) { // Imagine this method was a super complex method that was used as a helper method. return Html.RenderPartialAsync("HelloWorldPartial", model); } }

ASP.NET

ASP.NET is a free web framework for building great Web sites and Web applications using HTML, CSS and JavaScript.

Learn more »

Hello @Model.Name! Happy @Model.Age birthday.

This value was retrieved asynchronously: @(await AsyncValueRetrieval())

Partial Async: @await Html.PartialAsync("HelloWorldPartial", Model)

Render Partial Async (Custom model): @{ await RenderHelloWorldPartial(new User() { Name="Bob" }); }

Getting started

ASP.NET MVC gives you a powerful, patterns-based way to build dynamic websites that enables a clean separation of concerns and gives you full control over markup for enjoyable, agile development.

Learn more »

Get more libraries

NuGet is a free Visual Studio extension that makes it easy to add, remove, and update libraries and tools in Visual Studio projects.

Learn more »

Web Hosting

You can easily find a web hosting company that offers the right mix of features and price for your applications.

Learn more »

@await Component.InvokeAsync("Tags", 15)