
James S. answered 09/16/19
Senior Software Engineer specializing in C# and ASP.Net
Hello,
The way I've read this you're asking two separate questions.
- What is the difference between Razor and traditional ASP.Net markup
Razor is an alternative markup syntax to the classic ASP.Net markup language. Razor is more stream-lined using an "@" to denote the server-side code vs the traditional syntax of <%...%>.
In some cases, Razor is intelligent enough to only need the beginning "@", like rendering a single server-side variable. However if you need to denote a block of server side code it will need an ending "@".
- What is the difference between ASP.Net Core and ASP.Net Web Pages?
ASP.Net Web Page (or Web-forms) were introduced in ASP.Net 1.0. These web pages mixed HTML syntax and server-side code using <%...%> to denote the server-side code. Typically there we two files to a web-form. The HTML page, which ended in an ASPX extension and the server-side page, also called the code-behind file, which ended in a .cs or .vb extension depending on what language the programmer was using. ASP.Net MVC was released in 2009 and introduced the Model-View Controller pattern to ASP.Net. The Model was usually an object that represented the data to be displayed, the View was the page itself with HTML and typically @Razor markup, and controller which bound the two together and where the logic for the page lived.
.Net Core 1.0 was release in 2016 and is a complete re-write of the .Net framework. .Net Core made the .Net framework portable to other operating systems such as Macintosh and Linux. .Net Core also made the framework more cloud compliant so applications could be easily deployed to the cloud or containerized before deployment.
I hope this information answered your questions regarding the differences between the server-side markup syntax and the difference between traditional .Net framework and .Net Core.
Thanks,
Jim