Webmatrix tutorial (2) (Follow Microsoft's latest weapon: Create Your webmatrix Website Based on blank projects [Part 1])

Source: Internet
Author: User
Document directory
  • Create
  • Add a page
  • Create dynamic web page

Thank you for your reply and question. Here are some additional instructions:

Webmatrix was released by Microsoft in 2011 this year (January). It features:

  1. Completely free
  2. Applicable to Windows or Linux servers
  3. It can be used for PHP or Asp.net development.
  4. Support for Razor (cshtml) A new syntax structure (Scott emphasizes that razor is not a new language)
  5. Includes Seo optimization tools
  6. This allows developers to quickly install and use existing open-source systems (some are not open-source (or semi-open-source), such as dotnetnuke, umbraco, WordPress, and joomla.

See the following translations from create an ASP. NET Website from scratch.

If you have not installed webmatrix, read it first.Webmatrix tutorial (1) (follow the latest webmatrix-Microsoft weapon: Create your first webmatrix website)

Create a website from a template or a folder containing the Asp.net source code, or download an Open Source System from gallery as your website platform.

We will start with a blank project. ClickSite from template.

SelectEmpty siteGive it a nameWebmatrixdemo. ClickOK.

Before proceeding, let's take a look at the webmatrix user interface. When you open webmatrix and select a site, you openSiteWorkspace, which allows you to execute website configurations (such as specifying the default page) and monitor HTTP requests.

Create, delete, and update, and selectFilesWorkspace.

To add a database or a table or data, selectDatabasesWorkspace.

Finally, to learn how to help your website have better ranking information on the search engine, selectReports Workspace.

Add a page

ClickFilesWorkspace and clickNew.

Name the cshtml TemplateDefault. cshtml. Suffix. CshtmlThis is an ASP. NET page. It can contain HTML, JavaScript, CSS, and HTML. You can also add code that runs on the server.

ClickOK.

The cshtml template creates a new page.

Let's add some simple "Hello World" HTML.

Click in the navigation barDefault. cshtmlFile and then clickRunIn the browser, you can see:

Click nowDefault. cshtmlIn the Navigation Pane, clickRunButton to view the browser page.

Create dynamic web page

You can use ASP. NET Web Assistant to create a simple dynamic web page. Before that, you must install the Microsoft ASP. NET Assistant Library.

ClickRunRunDefault. cshtmlFile. In the browser address box, deleteDefault. cshtmlAnd replace it_ Admin. The resulting URL will be similar:

Http: // localhost: 8080/_ Admin

PressEnterWhen you browse this page, it will prompt you to create a password and guide you through some steps to ensure the security of your website. ClickInstall packages from an online feed.

Next, click Next to ASP. NET web helpers library 1.1 packageInstallButton,

On the following page, click Install to start installation.

After the installation is complete,_ AdminThe page displays the following results:

Now that you have installed the assistant, we will show you how to create a dynamic (programming) web page.

Return to webmatrix. InFileWorkspace, clickNew. Create a new cshtml webpage and name itTwitter. cshtmlAnd add some HTML and code:

In the Navigation Pane, selectTwitter. cshtmlFile, and then click Run:

Now, you have created a page using simple HTML and ASP. NET helpers.Twitter. ProfileIs one of the assistants in the Asp.net Assistant Library. Others include uploading and cropping images, playing video clips, and displaying data from the database.

Here, we use the new syntax razor for the first time. In the future, I will take a closer look at the usage of razor.

Webmatrix has many other functions. I will continue to learn from you. Thank you for reading this article.

Webmatrix content:

Webmatrix tutorial (1) (follow the latest webmatrix-Microsoft weapon: Create your first webmatrix website)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.