A file with .aspx extension is a webpage generated using Microsoft ASP.NET framework running on web servers. ASPX stands for Active Server Pages Extended and these pages are displayed in web browser at user end when the URL is accessed. It is successor of ASP technology which are also generated at server end but does not use .NET framework. ASP.NET pages may contain C# or VB.NET scripts that are translated to HTML by the web server for presentation to user in web browser. ASPX pages are also called .NET Web Forms. These can be opened and created with applications like Microsoft Visual Studio, Adobe Dreamweaver, Notepad++, and any text editor.
ASPX File Format
ASP.NET web forms are based on the event-driven model for interactions with the web application. The browser, being an end user, submits a web form to the server and the server returns a full markup page or HTML page in response. ASP.NET component model offers object model for ASPX pages. This model describes:
Server side counterparts of almost all HTML elements or tags, such as <form> and <input>.
Server controls, which help in developing complex user-interface. For example, the Calendar control or the Gridview control.
ASPX files use the ASP.NET Code Behind model for construction of these pages.
Sample code that is embedded inline in the ASPX page and provides all the functionality for the user implementation.The following C# code represents a sample ASP.NET page that includes in-line code:
Code can be written and stored in separate class files for clean separation of HTML from presentation logic. This makes the presentation layer independent of the executable code. Following is the code-behind for presentation to user.