![ASP.NET WP Tutorial](/asp.net_wp/images/asp.net-wp-mini-logo.jpg)
- ASP.NET WP Tutorial
- ASP.NET WP - Home
- ASP.NET WP - Overview
- ASP.NET WP - Environment Setup
- ASP.NET WP - Getting Started
- ASP.NET WP - View Engines
- Project Folder Structure
- ASP.NET WP - Global Pages
- ASP.NET WP - Programming Concepts
- ASP.NET WP - Layouts
- ASP.NET WP - Working with Forms
- ASP.NET WP - Page Object Model
- ASP.NET WP - Database
- ASP.NET WP - Add Data to Database
- ASP.NET WP - Edit Database Data
- ASP.NET WP - Delete Database Data
- ASP.NET WP - WebGrid
- ASP.NET WP - Charts
- ASP.NET WP - Working with Files
- ASP.NET WP - Working with Images
- ASP.NET WP - Working with Videos
- ASP.NET WP - Add Email
- ASP.NET WP - Add Search
- Add Social Networking to the Website
- ASP.NET WP - Caching
- ASP.NET WP - Security
- ASP.NET WP - Publish
- ASP.NET WP Useful Resources
- ASP.NET WP - Quick Guide
- ASP.NET WP - Useful Resources
- ASP.NET WP - Discussion
ASP.NET WP - Getting Started
In this chapter, we will look at how to start a simple example using ASP.NET Web Pages. To begin with, we will create a new website and a simple web page.
How to Create a Blank Website?
To start with, launch Microsoft WebMatrix which we have installed in the previous chapter.
![Web Matrix NewSite](/asp.net_wp/images/web_matrix_newsite.jpg)
We will create a blank site and then and add a page. To start with, click New and it will display the built-in templates.
![Built in Templates](/asp.net_wp/images/built_in_templates.jpg)
Templates are pre-built files and pages for different types of websites. To see all of the templates that are available by default, select the Template Gallery option.
![Template Gallery Option](/asp.net_wp/images/template_gallery_option.jpg)
Select the Empty Site template and enter the Site Name. In this case, we have entered FirstWebPageDemo as the Site Name and then we have to click Next.
![WebPage Demo](/asp.net_wp/images/webpage_demo.jpg)
It will install the required packages. Once the installation is finished, WebMatrix creates and opens the site as shown in the following screenshot.
![WebMatrix Creates](/asp.net_wp/images/webmatrix_creates.jpg)
Create an ASP.NET Web Page
Now to understand and become familiar with WebMatrix and ASP.NET Web Pages, let’s create a simple web page by clicking New in the Home tab.
![ASP.NET Web page](/asp.net_wp/images/asp.net_webpage.jpg)
WebMatrix displays a list of file types as shown in the following screenshot.
![WebMatrix Displays](/asp.net_wp/images/webmatrix_displays.jpg)
Select CSHTML, and in the Name box, enter FirstPage.cshtml and click Ok.
![Firstpage CSHTML](/asp.net_wp/images/firstpage_cshtml.jpg)
Now you can see that WebMatrix has created the page and opens it in the editor.
Let us first update the FirstPage.cshtml page as shown in the following program.
@{ } <!DOCTYPE html> <html lang = "en"> <head> <meta charset = "utf-8" /> <title>Welcome to ASP.NET Web Pages Tutorials</title> </head> <body> <h1>Hello World, ASP.NET Web Page</h1> <p>Hello World!</p> </body> </html>
Now to test this web page, let’s select the arrow which is below the Run option on the Home tab and select Internet Explorer as shown in the following screenshot.
![First Web Page](/asp.net_wp/images/first_webpage.jpg)
Now you will see the following empty web page.
![Internet Explorer](/asp.net_wp/images/internet_explorer.jpg)
Now let’s specify the following url − http://localhost:46023/firstpage in the browser and you will see the following output.
![Hello World](/asp.net_wp/images/hello_world.jpg)