With a basic understanding of the GUI layout, we can now
describe how to add an ASP.NET web page.
1.
Click the “Files” workspace icon and then select “Choose a File Type”. A
window displays a group of file types.
2.
Click to highlight “CSHTML” from the list of file types. CSHTML is a
WebMatrix file that supports HTML, JavaScript, and other web-related
programming platforms.
3.
Enter a name, such as “default.cshtml”, from the “Name” field to the
left of the “OK” button. The web page is created and opened within an editor.
At this point, the file only contains basic HTML, as shown below.
< !DOCTYPE html >
< html lang=”en” >
< head >
< title > < /title >
< /head >
< /body >
< /html >
4.
Add text to the < title> , < h1 >, and < p > tags, as
shown below.
< !DOCTYPE html >
< html lang=”en” >
< head >
< title >This is a test< /title >
< /head >
< h1 >Test 1 Example< /h1 >
< p >Test 1< /p >
< /body >
< /html >
5.
Save the file by clicking the “Save” icon at the top-left of the GUI.
The Save icon looks like a computer disk.
6.
Confirm that the current file is selected in the Files workspace. This
is accomplished by clicking on the “Files” workspace and viewing the Navigation
pane to ensure the current file is selected.
7.
Click the “Run” icon on the WebMatrix ribbon bar. The Run icon is on the
upper left of the GUI. The web page is processed and IIS Express web server
displays the page.
At this point you've created and run your first web page in
the WebMatrix development environment. You're now ready to explore the
WebMatrix GUI and all the features it supports. One of the primary features
supported by WebMatrix is programming with Razor Syntax. This is briefly discussed
in the following section.
For further online information on WebMatrix, consult the Microsoft ASP.NET website.
A detailed tutorial on WebMatrix web development is located here.