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:
Completely free
Applicable to Windows or Linux servers
It can be used for PHP or Asp.net development.
Support for Razor (cshtml) A new syntax structure (Scott emphasizes that razor is not a new language)
Includes Seo optimiza
Document directory
This article helps you
1. Install webmatrix.
2. Run webmatrix
3. Open Web Gallery
4. Select a system
5. Select the Database Type
6. Set the database administrator password
7. Start Installation
9. Run the website for the first time
10. Enter the website administrator information.
11. Browse home
12. open the file Workspace
13. Open a file
14. edit the file
15. Run the web
Document directory
Test your site
Use Database
Optimize your website
Release
Test your site
Webmatrix contains an IIS express which works much like IIS. However, IIS Express is integrated in webmatrix and runs on a local computer, which facilitates local testing.
Sometimes you need not only to check the appearance of the webpage, but you may want to know what happened in the background data exchange.
front, you see that your site uses a layout that includes HTML
Replace datamovies.cshtml content with static content
The static list has only 4 items, and if we want 5 items, we need to add one. When the data in the database is pushed to the page, the page does not know how many records are in the database, then it generates N
Let's first tell the page about the database, at the top of datamovies.cshtml, add the following code:
@{ var db= database.open ("Movies"); var SQLQ = "
database box like this and click Continue.
The publication will begin, and you will see its progress on the yellow progress bar at the bottom of the WebMatrix window. When you are finished, you will see the progress is complete, and for your convenience you will get the URL of the completed site:
View your website online
Click the URL and you will see that the Web site is running on the Internet. You may also see the "Website Coming Soon" message
Many people know that using webmatrix, Microsoft's latest weapon, can easily help you install the most commonly used PHP in windows. Asp.net open-source network applications such as WordPress, dnn, umbraco, mojoportal, joomla.
At the same time, the razor supported by webmatrix allows you to quickly create small dynamic ones. net website, in fact, webmatrix also h
("Movies"); var Movie = db. Querysingle (sqlselect,id); var moviename=movie.name; if (IsPost) { var sqldelete = "DELETE from Favorites WHERE id=@0"; Db. Execute (sqldelete,id); Response.Redirect ("datamovies.cshtml"); } }
Delete a page from a movie list call
Now that we have a valid delete page, we connect it to the movie list page so that the user can delete the item from the list and request that it be deleted.
On the Movie list page, si
Csdn.net will release an advanced tutorial on Microsoft's new Web development tool WebMatrix in the near future. This will help developers understand the most powerful Web development tool in Microsoft's history. After installing and using Microsoft's new development tool WebMatrix last released and teaching you how to use We
"]; moviegenre=request["Formgenre"]; movieyear=request["Formyear"]; var Sqlinsert = "INSERT into Favorites (Name, Genre, Releaseyear) VALUES (@0, @1, @2)"; var db = Database.open ("Movies"); Db. Execute (Sqlinsert, Moviename, Moviegenre, movieyear); } }
We created the string Sqlinsert,razor engine to allow the format statement to assign values to the parameters, @0, @1, @2 represent Moviename, moviegenre, Movieyear, respectively, the three
So far, you have learned how to create a website in WebMatrix, how to use styles and la s to make webpages smaller and easier to maintain, and how to make browsers download and present them faster. You have created a dynamic and data-driven webpage. This section describes how to create a webpage to add data to a database.
Microsoft WebMatrix is a free tool for creating, customizing, and publishing websites
Summary
WebMatrix is indeed very helpful for rapid website construction. I used it to build projects based on WordPress, Joomla, DNN, and other platforms, saving a lot of setup troubles, just click Next and enter some basic information.
This document describes how to use and read the SQL Server CE database in the WebMatrix project.
If you have heard about WebMatrix
browser and open the Web site running on your local server.
A lot of things have happened here. Let's examine it in detail.
Web server
Have you noticed the address bar on your browser? It does not open the file on your hard disk, but it launches the Web server and points the browser to the Web server, requiring it to provide file default.html.
Look at the system tray on your PC and you will see a small icon indicating that the Web server IIS Express is running.
Right-click on it and you wil
"/>
Open the Default. cshtml file and you can see the preceding HTML code. The @ code is Razor, which will be detailed in future articles. Then, enter some content on your page and run the page to check the result!
Run page
650) this. width = 650; "border =" 0 "alt =" "src =" http://www.bkjia.com/uploads/allimg/131228/1P24G110-4.jpg "/>
Click Run and the result is as follows:
650) this. width = 650; "border =" 0 "alt =" "src =" http://www.bkjia.com/uploads/allimg/131228/1P24GD2-5.jpg
In the previous article, an e-commerce website was created from the Web library. Now let's go back to webmatrix and see what functions it has.
As shown in figure 1, webmatrix has three main areas: the top ribbon area, the left side is the functional area, and the right side is the information or editing area. The tool buttons in the ribbon area change according to the functional area on the left.
Fig
The window shown in 1 is displayed when you run WebMatrix for the first time.
Figure 1 window displayed when WebMatrix is run for the first time
My website
Go to "my website" and you will be able to see the website you have designed.
Create a website from a Web Library
You can create a website from an open-source website system on the "Create a website from a Web Repository", such
The window shown in 1 is displayed when you run webmatrix for the first time.
Figure 1 window displayed when webmatrix is run for the first time
My website
Go to "my website" and you will be able to see the website you have designed.
Create a website from a Web Library
You can create a website from an open-source website system on the "Create a website from a Web
To learn how to use a good tool, the best way is to start with the template, so today's task is to create a website from the template, and then analyze the composition of the template.
On the WebMatrix start page, click "create website from template", select "bakery", enter "My panel store" in the website name, and click "OK.
After the creation process is complete, click the run button. The page shown in 1 is displayed in the browser.
Figure 1
Click
In the previous article, an e-commerce website was created from the Web library. Now let's go back to WebMatrix and see what functions it has.
As shown in figure 1, WebMatrix has three main areas: the top Ribbon area, the left side is the functional area, and the right side is the information or editing area. The tool buttons in the Ribbon area change according to the functional area on the left.
Figure 1
Csdn.net will soon be releasing the advanced tutorials on Microsoft's new Web development tool, WebMatrix, to help developers understand the most powerful Web development tool in Microsoft's history. Following the last release of how to install and use Microsoft New development tools WebMatrix and teach you how to use WebMatrix to create the first page. This issu
Webmatrix-based lightweight Web Development Series (10): webmatrix and ASP. NET MVC
In addition to providing the default programming model, webmatrix also applies to ASP. net MVC makes good support, but the same razor in ASP.. Net MVC is used in different ways. This section focuses on ASP.. Net MVC.
Start Time: 2010/12/20 10:00:00
Technical Level: Le
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.