.NET Documentation

Web Applications in .NET

.NET provides a rich set of frameworks for building modern, secure, and high‑performance web applications. Whether you prefer a full‑stack approach or a lean client‑side model, .NET has a solution that fits your needs.

Frameworks & Models

Web Forms
ASP.NET MVC
Razor Pages
Blazor Server
Blazor WebAssembly

ASP.NET Web Forms offers a drag‑and‑drop, event‑driven model that abstracts the stateless nature of HTTP.

<asp:Button runat="server" Text="Click Me" OnClick="Button_Click" />
Learn more →

ASP.NET MVC separates concerns with Models, Views, and Controllers, providing full control over HTML markup.

public class HomeController : Controller
{
    public IActionResult Index()
    {
        return View();
    }
}
Learn more →

Razor Pages simplifies page‑focused scenarios with a page‑centric programming model.

@page
@model IndexModel

Hello, @Model.Name!

Learn more →

Blazor Server runs UI interactions on the server over a real‑time SignalR connection.

@page "/counter"
@code {
    int currentCount = 0;
    void IncrementCount() => currentCount++;
}
Learn more →

Blazor WebAssembly runs .NET directly in the browser using WebAssembly.

dotnet new blazorwasm -o MyWasmApp
Learn more →

Getting Started

  1. Install the latest .NET SDK.
  2. Choose a template:
    • dotnet new webapp – Razor Pages
    • dotnet new mvc – MVC
    • dotnet new blazorserver – Blazor Server
    • dotnet new blazorwasm – Blazor WebAssembly
  3. Run dotnet run and open http://localhost:5000.

Sample Project

Clone the starter repository and explore the code:

git clone https://github.com/dotnet/samples.git
cd samples/aspnetapp
dotnet run

Resources