asp.net.ph

Skip Navigation LinksHome > Getting Started > ASP.NET Primer > Authoring an ASP.NET Page

Authoring an ASP.NET Page

Introducing ASP.NET Web Forms   Introducing Web Forms Server Controls   Publishing ASP.NET Files


This article covers the fundamentals of using a programming language to create ASP.NET files with a text editor.

Here we briefly examine how basic script commands can be used in ASP.NET pages to accomplish simple programming tasks.

For ASP.NET pages to run, the directory where your ASP.NET files reside must first be configured as an application root in IIS (Internet Information Services) Manager.

NOTE: For information on how you can setup your computer to run ASP.NET pages, see Publishing ASP.NET Files.

ASP.NET (.aspx) Files

ASP.NET files are text files with an .aspx file name extension.

In addition to static text and HTML content, an .aspx file may contain any combination of the following:

  • Page directives
  • Server-side scripts
  • Server-side include files
  • Server-side controls
  • Custom components

A quick way to create an .aspx file is to rename an HTML file by changing its file name extension to .aspx ( no modification of code is required ).

If a file does not contain any ASP.NET functionality, the server dispenses with the ASP.NET processing and simply sends the HTML response to the client.

This affords tremendous flexibility as you can assign your files .aspx extensions, even if you do not plan on adding ASP.NET functionality until later.

When a browser requests an .aspx resource, the ASP.NET runtime parses and compiles the target file into a .NET Framework Page class, and stores the compiled instance of the page in memory, which is then used to dynamically process subsequent incoming requests.

NOTE: The server by default parses and compiles an .aspx file only the first time it is accessed, and whenever the file is modified.

After the file loads in the browser, you will notice that the server has returned an HTML page. This is so because the server processes all ASP.NET server-side instructions prior to sending the generated page to the client. The user will always receive standard HTML.

Tools for Authoring .aspx Files

.aspx files can be created using any text editor.

As you progress, though, you may find it more productive to use a Rapid Application Development ( RAD ) editor with enhanced support for ASP.NET, such as Microsoft Visual Studio®.

Visual Studio offers a sophisticated graphical interface with powerful tools for developing both Web and Windows-based applications.

Whichever way you choose to develop your pages, you should have a clear grasp of what each line of code in any of your pages is meant for.

Bear in mind that even the most complex of Web applications are but a decent blend of code bits, each meant to carry out some course of action.

While using RAD tools to auto-generate code may be a boon at times and in certain cases, clearly there is no substitute to the immediate and direct insight derived from being able to code by hand.

Having a bare understanding of the logic behind each Web page you build is surely more gainful towards realizing the full potential of ASP.NET, than just relying on some code drawn out for you.

In the following sections, we take a closer look at basic scripting concepts and how they apply to ASP.NET.

More ...
Back to top


© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note