What is Razor Syntax
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Manish Kumar ChoudharyRank #339 · 7.4K reputationPosted Feb 26, 2015, 7:53 PM EST
Go through followings link it will help you
http://www.asp.net/web-pages/overview/getting-started/introducing-razor-syntax-%28c%29
Najna Abdulla101 reputationPosted Mar 2, 2015, 9:32 PM EST
@{ var myMessage ="Hello World"; }
The value of myMessage is:
@myMessage@{
var greeting = "Welcome to our site!";
var weekDay = DateTime.Now.DayOfWeek;
var greetingMessage = greeting + " Here in Huston it is: " + weekDay;
}
The greeting is:
@greetingMessageMain Razor Syntax Rules for C#
Najna Abdulla101 reputationPosted Mar 2, 2015, 9:32 PM EST