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 108 | Next

Robin Pars, Laurence Moroney, and John Grieb

"Foundations of ASP.NET AJAX"

create('A custom error was generated', errParms);
This additional information in the errParms object can then be used in the catch clause
for better error handling and logging.
Number Extension
The Number extension is similar to the Date extension in that it has a few static and
instance methods for extending the underlying JavaScript type and providing support for
parsing and output formatting. Just like dates, the formatting of numbers can vary based
on the specified culture. This is especially true when displaying currencies that are stored
as numbers. The Number extension has two methods for parsing and another two for formatting
values as listed in Table 4-5.
CHAPTER 4 ?–  ASP.NET AJAX CLIENT LIBRARIES 61
Table 4-5.Methods of the Number Extension
Method Name Description
format Formats a number by the invariant culture
localeFormat Formats a number by the current culture
parseInvariant Parses a number value from a string
parseLocale Parses a number from a locale-specific string
The two formatting methods of the Number extension support four format providers
that can be used depending on a type of number (e.


Pages:
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120