Run Your First Razor Code in WebMatrix

In this chapter you will learn

  • Write Your First Razor Syntax in WebMatrix
  • Execute Your Code

So, I think that the Overview of Razor Markup and WebMatrix has finished. It’s time to do some practical based activity. In this chapter you will write your First Razor Syntax in WebMatrix and debug your program to see output. In the previous chapter you have already learned how to use WebMatrix to write Razor Markup.

Programming Example

In this programming Example, I will show the current date and time in the browser using C# and Razor Markup.

  • Output

    Current Year: 2016
    Current Day : Tuesday
    Current Month: 8
    Current Time: PM 05:43

    Summary

    This is just an example of razor markup to teach you how to debug program using WebMatrix. If you have successfully debugged this program at your PC and get desire output in web browser then you are absolutely ready to learn Razor Syntax.


    Leave a Reply

    Your email address will not be published. Required fields are marked *