Welcome to ASP.NET Documentation

The ASP.NET family of web development frameworks, built on the .NET platform, allows you to build robust, dynamic, and high-performance web applications and services. This section provides comprehensive documentation, guides, and tutorials to help you master ASP.NET development.

Key Frameworks

ASP.NET encompasses several frameworks, each designed for different architectural patterns and development needs:

ASP.NET Core

The next generation of ASP.NET, ASP.NET Core is a cross-platform, high-performance, open-source framework for building modern, cloud-enabled applications. It supports:

  • Cross-platform development (Windows, macOS, Linux)
  • High performance and scalability
  • Unified MVC and Web API
  • Modular architecture

Learn more about ASP.NET Core →

ASP.NET MVC

A popular framework that implements the Model-View-Controller (MVC) pattern, providing a clean separation of concerns for building complex, maintainable web applications.

Explore ASP.NET MVC →

ASP.NET Web Forms

An event-driven framework that simplifies web development by allowing developers to build dynamic web pages using a drag-and-drop model similar to desktop application development.

Discover ASP.NET Web Forms →

ASP.NET Web API

A framework for building HTTP services that can be accessed from various clients, including browsers, mobile devices, and desktop applications.

Get started with ASP.NET Web API →

ASP.NET Blazor

A modern framework for building interactive client-side web UI with .NET. Blazor allows you to build web applications using C# instead of JavaScript.

Dive into ASP.NET Blazor →

Getting Started with a Sample

Here's a simple example of a minimal "Hello World" application using ASP.NET Core:


using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;

var builder = WebApplication.CreateBuilder(args);

// Add services to the container.
builder.Services.AddRazorPages(); // Or AddControllersWithViews(); for MVC

var app = builder.Build();

// Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment())
{
    app.UseExceptionHandler("/Error");
    app.UseHsts();
}

app.UseHttpsRedirection();
app.UseStaticFiles();

app.UseRouting();

app.UseAuthorization();

app.MapRazorPages(); // Or app.MapControllerRoute(...) for MVC

app.Run(async context =>
{
    await context.Response.WriteAsync("Hello, ASP.NET World!");
});

// To run this, save as Program.cs and execute using the .NET CLI:
// dotnet run
                    

This example demonstrates the fundamental setup for an ASP.NET Core application. For more detailed examples and explanations, please refer to the specific framework documentation linked in the sidebar.