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

Syntax

var booleanVar = new Boolean(true);

Extension Functions

Name

Description

parse Function

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

Remarks

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.

Example

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.

JavaScript

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

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