Web Building - Creating an Empty Web Site

How to create an empty web site in PHP, ASP, and ASP.NET.

WebMatrix is a free web editor. It lets you create web sites using many different languages.

Create a Web Site on Your Own PC

In this demo, we will create web sites, using different web server languages.

If you install WebMatrix, you will be able to follow the examples on your own PC.

WebMatrix contains:

  • Web examples and templates
  • Support for many different web languages
  • A web server (IIS Express)
  • A database server (SQL Server Compact)

With WebMatrix you can start with an empty web site and a blank home page, or you can build on templates using PHP, ASP.NET, Umbraco, DotNetNuke, Drupal, Joomla, WordPress and more. WebMatrix also has built-in tools for databases, security, search engine optimization, and web publishing.

To install WebMatrix, follow this link: http://www.microsoft.com/web/gallery/install.aspx?appid=WebMatrix

Create an Empty Web Site

Follow the three simple steps below to create an empty web site with WebMatrix:

  • Select a Template
  • Edit the Home Page
  • Run the Web Site

The 3 steps below, creates an empty ASP.NET Web Pages site. If you want to create an PHP Site, a Classic ASP site, or a Web Forms site, look at the bottom of this page.

Step 1: Select a Template

Start WebMatrix, and click Templates:


Select ASP.NET templates, select Empty Site, name the site Demo, and click Next:


WebMatrix creates a new site and displays a workspace window.

In the left pane, select the Files workspace:


WebMatrix automatically creates some folders and files for your web site:

  • App_Data - Folder for storing databases and data files
  • bin - Folder for storing asp.net files
  • Default.cshtml - Your default home page
  • favicon.ico - Your favourite site icon
  • robots.txt - Text file for addressing search robots
  • Web.config - Configuration file for your web site

Step 2: Edit the Home Page

To edit your home page, double-click the file Default.cshtml.

Put the following content into the file:

<!DOCTYPE html>

<html lang="en">
    <meta charset="utf-8" />
    <title>Web Page Demo</title>
    <h1>My First Web Page</h1>

In the Quick Access Toolbar, click Save:


Step 3: Run Your Web Site

In the ribbon bar, click Run:


WebMatrix starts a web server (IIS Express) and runs the page in your default browser:


Note WebMatrix selects a random port number for your local web server.
In the example above it is displayed as: http://localhost:1670.

Create an Empty PHP Site

Follow the 3 steps above, but:

In step 1, select an PHP Empty Site, instead of an ASP.NET empty site.

In step 2, edit the Index.php home page instead of the Default.cshtml home page.

Create an Empty ASP Classic Web Site

Follow the 3 steps above, but:

In step 2, rename the home page from Default.cshtml to Default.asp.

Create an Empty ASP.NET Web Forms Site

Follow the 3 steps above, but:

In step 2, rename the home page from Default.cshtml to Default.aspx.

Create an Empty Node.js Site

Follow the 3 steps above, but:

In step 1, select an Node.js Empty Site, instead of an ASP.NET empty site.

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3c-schools.com:

Download XML Editor FREE Website BUILDER Free HTML5 Templates FREE Website Templates Free HTML Templates