The dispaly to the left was rendered by the following razor code:
<!-- Single statement block --> @Code dim myMessage = "Hello World" End Code <p>The value of myMessage is: @myMessage</p> <!-- Multi-statement block --> @Code dim greeting = "Welcome to our site!" dim weekDay = DateTime.Now.DayOfWeek dim greetingMessage = greeting & " Here in Huston it is the Week day: " & weekDay End Code <p>The greeting is: @greetingMessage</p>
The value of myMessage is: Hello World
The greeting is: Welcome to our site! Here in Huston it is the Week day: 6
The week day number is the Visual Basic Code number.
Visual Basic Number to Calendar Day | |||||||
Number | 0 | 1 | 2 | 3 | 4 | 5 | 6 |
DAY | SUNDAY | MONDAY | TUESDAY | WEDNESDAY | THURSDAY | FRIDAY | SATURDAY |