How to Create an ASPX File

By Lysis

Aspx files are a Microsoft .NET format used to display dynamic web pages to readers. The aspx files are created using Microsoft's development platform. Visual Studio .NET provides you with the means to create aspx web forms. These web forms are then uploaded to a host provider that has the capabilities of running the .NET code. Creating a simple aspx file can also be used to display HTML. Creating your first aspx file is accomplished in the Visual Studio console.

Step 1

Open your Visual Studio .NET application. This is normally located in the "Microsoft Visual Studio .NET" directory in the Windows start menu programs.

Step 2

Click the "File" menu item and select "New Web Site." This starts a new website on your computer where you can add aspx files.

Step 3

Select "ASP.NET Website" from the list of templates in the opening window. Enter a location for the new website in text box labeled "Location." Choose if you want to program in VB.NET or C# in the labeled drop down box. Press the "Ok" button when you are finished. Visual Studio automatically creates a website with the first aspx file included named "Default.aspx."

Step 4

Right-click the website name in the Solution Explorer on the right of the Visual Studio screen. Select "New" and then "Web Form." Each time you do this step, you create a new aspx file in your website.

Step 5

Double-click the "Default.aspx" file in the Solution Explorer. This opens the file where you can edit the HTML. Right-clicking the file and selecting "View Code" shows you the code-behind where you enter your functions and events. In the HTML view, enter some text within the "

" tag.

Step 6

Save the file and right-click on it in the Solution Explorer. Select "View in Browser." This opens a browser and allows you to test the aspx page.