ASP.NET applications can include many types of files. Table 5-1 introduces the essential
ingredients.
File Name | 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 the user can’t access these files directly. Instead, they must be hosted inside an ASP.NET web page. User controls allow you to develop a small piece of user interface and reuse it in as many web forms as you want without repetitive code |
Ends with .asmx | These are ASP.NET web services—collections of methods that can be called over the Internet. Web services work differently than web pages, but they still share the same application resources, configuration settings, and memory. |
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. You’ll get an introduction to the web.config |
Global.asax | This is the global application file. You can use this file to define global variables (variables that can be accessed from any web page in the web application) and react to global events (such as when a web application first starts). |
Ends with .cs | These are code-behind files that contain C# code. They allow you to separate the application logic from the user interface of a web page. |
| |
your web application can contain other resources that aren’t special ASP.NET
files. For example, your virtual directory can hold image files, HTML files, or CSS files. These
resources might be used in one of your ASP.NET web pages, or they might be used independently.
A website could even combine static HTML pages with dynamic ASP.NET pages.
Tags:
asp.net