Use WebMatrix to create web pages. Use file type CSHTML for Razor pages.
Create a Web Page with WebMatrix
Select the Files workspace. This workspace lets you work with files and folders. The left pane shows the file structure of your site.In the ribbon, click New:
Choose file type CSHTML, (You will learn more about CSHTML files later) and in the Name box, type default.cshtml:
When you click OK, WebMatrix creates a web page and opens it in the editor:
Add title, heading, and paragraphs:
| <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title>Hello World Page</title> </head> <body> <h1>Hello World Page</h1> <p>Hello World Page</p> </body> </html> |
In the ribbon, click Run:
WebMatrix starts a web server (IIS Express) that you can use to test pages on your computer. The page is displayed in your default browser.
No comments:
Post a Comment