Is it possible (using HTML5 Shiv, for example) to implement HTML5 on a Webforms-based platform? Will ASP.NET Webforms allow the developer to semantically mark up a page using the new HTML5 elements?
views:
62answers:
3I'd say ASP.net MVC is more suited to this type of development but I dont see any overwhelming reasons why you couldn't produce webforms pages using HTML5 as it't for the most part an extension to HTML4.
Probably a lot more hand-coding pages than the RAD drag and drop webforms (unfortunately) encourages.
You can create your own custom controls that will render down to whatever html elements you want..
You can output to the page whatever HTML you want, you just have to control that output. So whereas the standard set of Asp.Net controls will output to normal HTML elements like
<label /> and <input /> etc.
. You can do your own implementation quite easily.
Also there is nothing stopping you adding custom classes or html5 css attributes to the rendered HTML of Asp.Net controls, just bear in mind that the HTML5 isn't well supported with actual browser usage yet..
I say yes you can but if you want to make complex change it doesn't have to be easy task. You have full control on markup placing in aspx and ascx files and on markup generated in your own custom controls. In code behind code you can use Attributes collection of controls to add HTML5 specific attributes. For build in web controls you can create your own ControlAdapters which will overwrite rendering of build in web controls.
Check this article for description of control adapters.