ASP.NET File Types Description

Ends with .aspx These are ASP.NET web pages (the .NET equivalent of the .asp file in
an ASP application). They contain the user interface and, optionally, the underlying application code. Users request or navigate directly to one of these pages to start your web application.

Ends with .ascx These are ASP.NET user controls. User controls are similar to web pages, except that they can’t be accessed directly. Instead, they must be hosted inside an ASP.NET web page. User controls allow you to develop an important piece of the user interface and reuse it in as many web forms as you want without repetitive code.

Ends with .asmx or .svc These are ASP.NET web services. Web services work differently than web pages, but they still share the same application resources, configuration settings, and memory. However, ASP.NET web services are gradually being phased out in favor of WCF (Windows Communication Foundation) services, which were introduced with .NET 3.0 and have the extension .svc. You’ll use web services with ASP.NET AJAX

web.config This is the XML-based configuration file for your ASP.NET application. It includes settings for customizing security, state management, memory management, and much more.

global.asax This is the global application file. You can use this file to define global variables and react to global events, such as when a web application first starts (see Chapter 5 for a detailed discussion). Visual Studio doesn’t create a global.asax file by default—you need to add it if it’s appropriate.

Ends with .cs These are code-behind files that contain C# code. They allow you to separate the application from the user interface of a web page.