Monday, August 10, 2009

Obsolete - HttpContext.Current.Request.Browser.JavaScript

'System.Web.Configuration.HttpCapabilitiesBase.JavaScript' is obsolete: 'The recommended alternative is the EcmaScriptVersion property. A Major version value greater than or equal to 1 implies JavaScript support. http://go.microsoft.com/fwlink/?linkid=14202'

Try using the following instead:

(HttpContext.Current.Request.Browser.EcmaScriptVersion.Major > 1)

See also: HttpBrowserCapabilities.EcmaScriptVersion