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.








Boolean Type Extensions

Provides extensions to the base ECMAScript (JavaScript) Boolean Object object.

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

Inherits: None


var booleanVar = new Boolean(true);

Extension Functions



parse Function

Converts a string representation of a logical value to its Boolean Object object equivalent.


Boolean extensions are part of the Microsoft AJAX Library. They add functionality to the JavaScript Boolean 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 Boolean Object in the JScript Language Reference.


The following example shows how to create a new Boolean object and invoke the Microsoft AJAX Library parse function to create a Boolean value from a string.


var a = new Boolean(true);      
if (a == true){
    alert("a = true"); 
    alert("a = false");

var b = Boolean.parse("true");
if (b == true){
    alert("b = true"); 
    alert("b = false");