Documentation for: ASP.NET Ajax Version 1.0

This documentation is for a previous version. For the current released version, see the ASP.NET Ajax documentation on MSDN.








Number Type Extensions

Extends the base ECMAScript (JavaScript) Number Object functionality with static and instance methods.

Namespace: None. This type extension is global and not part of a namespace.

Inherits: None


var numberVar = Number.parseInvariant("4");

Extension Functions



format Function

Formats a number by using the invariant culture.

localeFormat Function

Formats a number by using the current culture.

parseInvariant Function

Returns a numeric value from a string representation of a number.

parseLocale Function

Creates a number from a locale-specific string.


Number extensions are part of the Microsoft AJAX Library. They add functionality to the JavaScript Number object and provide members that are more familiar to .NET programmers.

For more information about the JavaScript object that this type extends and about its constructor, see JScript Number Object in the JScript Language Reference.


The following example shows how to call the Microsoft ASP.NET AJAX parseInvariant extension function to create a number from the string representation of a number.


var a = Number.parseInvariant("4");
var b = new Number(2);
var c = Number.parseInvariant("1.53") + a + b;
// View the results: "7.53"