SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 102 | Next

Robin Pars, Laurence Moroney, and John Grieb

"Foundations of ASP.NET AJAX"


Figure 4-1. JavaScript output of the Array extension sample
The Boolean extension provided in the ASP.NET AJAX client library is the simplest one
with the least number of methods. It just provides one extra method, parse, which converts
a string into a Boolean value. The native JavaScript Boolean type does not natively
support string initialization. The following script simply declares a Boolean value set to
false and displays the Boolean value if false.
boolVar = Boolean.parse("false");
if (!boolVar)
alert ('False');
CHAPTER 4 ?–  ASP.NET AJAX CLIENT LIBRARIES 57
?– Note In Visual Studio 2008, there is great Intellisense support for all types in xyz.
Date Extensions
Months, days, or years are fairly easy to get access to via the native JavaScript Date object,
but having globalization support for dates takes some work. The ASP.NET AJAX client
library Date extension provides excellent support for globalization of dates by enabling
a wide range of date formatting options based on the browser locale. Unlike the Array
extension, the methods provided by the Date extension are instance methods, so you
have to create a Date object before using them.


Pages:
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114