Razor (with an 'o') is a templating syntax that allows you to embed C# in your HTML to be executed on the server. HTML is the language that browsers understand. You use Razor to help generate HTML. Follow some of the tutorials here to help get a better understanding
of how they fit together: http://www.asp.net/web-pages
HTML5 is the latest specification for the HTML markup language. IE7 and IE8 will happily accept HTML5, but they do not implement some of the newer features. So long as you stick to traditional HTML elements (those that are supported in HTML 4) you should
be fine.
The answer from Mikesdotnetting is more like a perfect answer.
And HTML5? there are some elements of HTML5 I should say, CSS which are not supported in IE8 and IE9. Being a user HTML5 is a blessing. Being a developer HTML5 is a nightmare (Only somehow)
Please "Marks As Answer" if any answer helped you out!
~~! FIREWALL !~~
Marked as answer by aammiz on Nov 08, 2012 08:20 AM
Do not compare the two. Razor is for server processing. HTML/HTML5 is the markup for browser processing. Server processing means that the browser does not play a role and the work is done by a server as in the case of a IIS. Browser processing is what should
concern the browser as this is rendered/interpreted by the client.
To answer your question, yes you can use Razor, but HTML5 is not interpreted correctly by IE7/8, so you should use HTML instead.
Afzal. why would you say html 5 is a nightmare for developer. I saw it couple of months ago . It seemed like it is making life easier what is your experience that it seem like nightmare?
Well yes its pretty easy :) Although there are some elements and attribute which are difficult to learn. For example I am not able to learn SVG which is used for Graphix control.
Yet Placeholder is a good attribute. I think it was in html4 too as the list of html5 new born elements dont have this.
Please "Marks As Answer" if any answer helped you out!
~~! FIREWALL !~~
Marked as answer by aammiz on Nov 09, 2012 12:05 PM
aammiz
Member
487 Points
524 Posts
Razar vs html 5
Nov 03, 2012 09:37 AM|LINK
HI I have question.
Our clients uses IE7 and IE8 for web asp.net application. Can we use RAZAR code?
Also what is the difference between RAZAR and HTML5? Are they both same?
Mikesdotnett...
All-Star
154941 Points
19870 Posts
Moderator
MVP
Re: Razar vs html 5
Nov 03, 2012 10:02 AM|LINK
Razor (with an 'o') is a templating syntax that allows you to embed C# in your HTML to be executed on the server. HTML is the language that browsers understand. You use Razor to help generate HTML. Follow some of the tutorials here to help get a better understanding of how they fit together: http://www.asp.net/web-pages
HTML5 is the latest specification for the HTML markup language. IE7 and IE8 will happily accept HTML5, but they do not implement some of the newer features. So long as you stick to traditional HTML elements (those that are supported in HTML 4) you should be fine.
Beginning ASP.NET Web Pages with WebMatrix | My Site | Twitter
Afzaal.Ahmad...
Contributor
2661 Points
1040 Posts
Re: Razar vs html 5
Nov 03, 2012 05:46 PM|LINK
The answer from Mikesdotnetting is more like a perfect answer.
And HTML5? there are some elements of HTML5 I should say, CSS which are not supported in IE8 and IE9. Being a user HTML5 is a blessing. Being a developer HTML5 is a nightmare (Only somehow)
~~! FIREWALL !~~
ozkary
Contributor
2034 Points
303 Posts
Re: Razar vs html 5
Nov 07, 2012 01:31 AM|LINK
Do not compare the two. Razor is for server processing. HTML/HTML5 is the markup for browser processing. Server processing means that the browser does not play a role and the work is done by a server as in the case of a IIS. Browser processing is what should concern the browser as this is rendered/interpreted by the client.
To answer your question, yes you can use Razor, but HTML5 is not interpreted correctly by IE7/8, so you should use HTML instead.
og-bit.com
aammiz
Member
487 Points
524 Posts
Re: Razar vs html 5
Nov 08, 2012 08:22 AM|LINK
Afzal. why would you say html 5 is a nightmare for developer. I saw it couple of months ago . It seemed like it is making life easier what is your experience that it seem like nightmare?
Afzaal.Ahmad...
Contributor
2661 Points
1040 Posts
Re: Razar vs html 5
Nov 08, 2012 09:42 AM|LINK
Well yes its pretty easy :) Although there are some elements and attribute which are difficult to learn. For example I am not able to learn SVG which is used for Graphix control.
Yet Placeholder is a good attribute. I think it was in html4 too as the list of html5 new born elements dont have this.
~~! FIREWALL !~~
aammiz
Member
487 Points
524 Posts
Re: Razar vs html 5
Nov 09, 2012 12:05 PM|LINK
Thanks All