1 / 9

Microsoft WebMatrix

Microsoft WebMatrix. Web applications using ASP.NET Razor Syntax. What is WebMatrix. WebMatrix is a web development tool from Microsoft Don’t confuse with ASP.NET WebMatrix (2003) WebMatrix is for light weight web applications Visual Studio is for ”heavy weight” web applications

rudolf
Download Presentation

Microsoft WebMatrix

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Microsoft WebMatrix Web applications using ASP.NET Razor Syntax Microsoft WebMatrix

  2. What is WebMatrix • WebMatrix is a web development tool from Microsoft • Don’t confuse with ASP.NET WebMatrix (2003) • WebMatrix is for light weight web applications • Visual Studio is for ”heavy weight” web applications • WebMatrix supports ASP.NET and PHP • WebMatrix supports many open frameworks, like • Jomla (Content Management System) • Umbraco (another CMS) • Drupal (yet another CMS) • Etc. Microsoft WebMatrix

  3. Different file types ASP.NET Web form using ordinary C# ASP.NET Web Page using Razor Syntax Microsoft WebMatrix

  4. Razor Syntax • Making ASP.NET web applications with WebMatrix you can use Razor Syntax • ASP.NET Razor Syntax is a part of ASP.NET MVC 3 • Inline coding in C# or VB.NET • No code behind as in ordinary ASP.NET • Further readings • http://www.asp.net/webmatrix/tutorials/2-introduction-to-asp-net-web-programming-using-the-razor-syntax • http://weblogs.asp.net/scottgu/archive/2010/07/02/introducing-razor.aspx Microsoft WebMatrix

  5. Razor is just another way of using the ASP.NET framework Figure from http://www.asp.net/webmatrix/tutorials/2-introduction-to-asp-net-web-programming-using-the-razor-syntax Microsoft WebMatrix

  6. Razor syntax, examplesfrom http://www.asp.net/webmatrix/tutorials/2-introduction-to-asp-net-web-programming-using-the-razor-syntaxand http://www.asp.net/webmatrix/tutorials/create-an-asp-net-website-from-scratch @{   var result = "";   if(IsPost)   {      result = "This page was posted using the Submit button.";   }   else   {      result = "This was the first request for this page.";   }}<!DOCTYPE html><html>    <head>        <title></title>    </head><body><form method="POST" action="" >  <input type="Submit" name="Submit" value="Submit"/>  <p>@result</p></form></body></html>    </body></html> @{     var db=Database.Open("WebMatrixDemo");     var grid=new WebGrid(db.Query("SELECT * FROM Product ORDER BY Name")); } <!DOCTYPE html> <html>     <head>         <title>Products</title>         <style type="text/css">             table {border-collapse:  collapse;}             td, th {border:  solid 1px; }         </style>     </head>     <body>         <h1>Products</h1>         @grid.GetHtml()     </body> </html> Microsoft WebMatrix

  7. IIS Express • Comes with WebMatrix • WebMatrix can run with ordinary IIS, but IIS Express is preferred • Development Environment • IIS Express • Should be more robust than ASP.NET Development server (bundled with Visual Studio) • http://visualstudiomagazine.com/articles/2011/01/19/iis-express.aspx Microsoft WebMatrix

  8. SQL Server Compact • WebMatrix comes with SQL Server Compact • Embedded SQL Server Database Engine • Free to use and distribute • Filenames • DatabaseName.sdf • Further information • http://www.microsoft.com/sqlserver/en/us/editions/compact.aspx • http://weblogs.asp.net/scottgu/archive/2010/06/30/new-embedded-database-support-with-asp-net.aspx Microsoft WebMatrix

  9. Further readings, etc. • MicroftWebMatrix • http://www.microsoft.com/web/webmatrix/ • Microsoft ASP.NET WebMatrix 1.0: Small, Simple, Seamless • http://www.asp.net/webmatrix • Scott Guthrie Introducing WebMatrix • http://weblogs.asp.net/scottgu/archive/2010/07/06/introducing-webmatrix.aspx • ASP.NET Introduction to ASP.NET Web Programming Using the Razor Syntax • http://www.asp.net/webmatrix/tutorials/2-introduction-to-asp-net-web-programming-using-the-razor-syntax • Minfei Yan 10 minutes to understand ASP.NET Razor Syntax and WebMatrix • http://innovativesingapore.com/2010/10/razor-webmatrix-asp-net/ • Phil HaackRazor Syntax Quick Reference • http://haacked.com/archive/2011/01/06/razor-syntax-quick-reference.aspx • MicrosoftWeb Development 101 using WebMatrix • Online book • http://www.microsoft.com/web/post/web-development-101-using-webmatrix Microsoft WebMatrix

More Related