1 / 6

Programmering af dynamiske websider

Programmering af dynamiske websider. http://www.asp.net/web-pages/tutorials/introducing-aspnet-web-pages-2/intro-to-web-pages-programming. Serverkode (C#). Html og kode. Razor syntaks. @ indikerer programkode og ikke html

Download Presentation

Programmering af dynamiske websider

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. Programmering af dynamiske websider http://www.asp.net/web-pages/tutorials/introducing-aspnet-web-pages-2/intro-to-web-pages-programming

  2. Serverkode (C#)

  3. Html og kode

  4. Razor syntaks • @ indikerer programkode og ikke html • @(a*b) udregner udtrykket i parenteser, hvis a er 4 og b 3 er resultatet 12 • @{ } indikerer et kode afsnit • Finder normalt selv ud af hvad der er kode og hvad der er html

  5. Variable • Sted i computerens hukommelse • Indeholder en værdi • Tilgås med variablens navn @{ var a = 17; } <div>@a</div> -> 17

  6. Konditionel logik(if/else) if(isPost){ // gør noget hvis siden blev kaldt // med post metoden } if(isPost){ // gør noget hvis siden blev kaldt // med post metoden } else{ // ellers gør noget andet }

More Related