ASP.NET and HTML 5 - Will this combination Work?


Published on

  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

ASP.NET and HTML 5 - Will this combination Work?

  1. 1. ASP.NET and HTML 5- Will this combination Work?HTML5 has introduced the world to the gen-next web, enabling the addition of new and interestingaspects to the web. While some consider it as just something that consists of new markup attributes, someothers consider it as a huge revolution that consists of more than 100 specifications that relate to the nextgeneration of Web technologies. The W3C has addressed the scope of what’s changing on the Web byintroducing HTML5 as a unifying concept for that change.ASP to migration came as a major change. ASP.NET was Microsofts first attempt to enableMicrosoft development with the ease and efficiency of the.NET desktop development environment.However, its failure to satisfactorily maintain session state prevented it from realizing the simple visualdesktop development methodology.When Microsoft announced that HTML5 and JavaScript would be the first-class tools for creatingWindows 8 applications, most .NET development experts were worried regarding their investments inXAML and Silverlight being wasted. These apprehensions were soon put to rest when they learned thatthe technologies bundled under the HTML5 banner are great for client-side development. Also, thosetechnologies can be repurposed to be used in desktop and smartphone development. Moreover, HTML5-related technologies provide direct support for features that developers take for granted in otherenvironments.HTML5 provides great support to ASP.NET web-forms. Here’s why the ASP.Net and HTML5combination will work well.  HTML5 elements are defined as markup with a client-side event model and theres no requirement on the server. Also, the HTML elements and attributes emitted by ASP.NET server controls are well formed and validated against the HTML5 specification.  Developers who want built-in server controls in order to leverage the new aspects of HTML5 like semantic elements can do so using custom controls or content adapters.  In order to omit specific HTML5 elements, Render method of the UserControl class can be used.  ASP.NET 2.0. has introduced another mechanism of supporting HTML5 elements through content adapters. Content adapters are powerful tools that allow you to specify how specific controls should emit markup.  The input elements in HTML5 have far more states (text, password). In addition to the already existing states, HTML5 adds number, datetime, email, url and a half-dozen more. The new required attribute prevents a page from being submitted until the element is provided a value.  While working with numeric fields, the step, max and min attributes provide further declarative control over the users data entry; on text fields, the pattern attribute allows you to apply a regular expression to the users input. If a prompt string needs to be displayed in a text box, the new placeholder attribute can be added and set to the string to be displayed.
  2. 2.  Earlier, developers used div and span tags as structural elements to define sections of a page that were to be styled or managed as a group. HTML5 includes new tags that acknowledge the typical grouping that developers use in pages: That pages usually have headers, footers and navigation sectors in addition to their primary content. The section tag allows you to divide your page into sections, containing articles (the pages primary content) and asides (content that isnt a critical part of the page).ASP.NET developers need to be well-versed with HTML5 features since all of the leading browsers areaggressively supporting them and newer web applications are bound to be relying heavily on them. UsingMicrosoft ASP.NET 4.5 and Visual Studio 2012 makes building web applications using HTML 5,EcmaScript 5 and CSS 3 easier than ever.