Sunday, August 29, 2010

ASP.NET 4.0 Web Forms - 1 of 3

Web Forms has been a core feature in ASP.NET since the release of ASP.NET 1.0. Many enhancements have been in this area for ASP.NET 4, such as the following:

  • The ability to set meta tags.
  • More control over view state.
  • Support for recently introduced browsers and devices.
  • Easier ways to work with browser capabilities.
  • Support for using ASP.NET routing with Web Forms.
  • More control over generated IDs.
  • The ability to persist selected rows in data controls.
  • More control over rendered HTML in the FormView and ListView controls.
  • Filtering support for data source controls.
  • Enhanced support for Web standards and accessibility.
  • Project template changes.



Meta- Tags

Two properties have been added to the Page class: MetaKeywords and MetaDescription. This will work similar to title property of the page.

Control.ViewStateMode

You can use the ViewStateMode property to enable view state for an individual control even if view state is disabled for the page.

New Browsers

Some of them are Chrome, IPhone etc... The browser definition file now includes - blackberry.browser,chrome.browser,Default.browser,firefox.browser,gateway.browser,generic.browser,ie.browser,iemobile.browser,iphone.browser,opera.browser
,safari.browser

Browser Capabilities

ASP.NET 4 includes a new feature referred to as browser capabilities provider.

In ASP.NET version 3.5 Service Pack 1, you define browser capabilities in an XML file. This file resides in a machine-level folder or an application-level folder. Most developers do not need to customize these files, but for those who do, the provider approach can be easier than dealing with complex XML syntax. The provider approach makes it possible to simplify the process by implementing a common browser definition syntax, or a database that contains up-to-date browser definitions, or even a Web service for such a database.

No comments: