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

Robin Pars, Laurence Moroney, and John Grieb

"Foundations of ASP.NET AJAX"

Table 4-2 lists the four methods of this
extension.
Table 4-2.Methods of the Date Extension
Method Name Description
format Formats a date by using the invariant (culture-independent) culture
localeFormat Creates a date from a locale-specific string using the current culture
parseInvariant Creates a date from a string using the invariant culture
parseLocale Creates a date from a locale-specific string using the current culture
Note that there are two format methods here: format and localeFormat. The only difference
is that the format method is culture invariant, meaning that regardless of the
current culture, it always uses the same formatting for the date. If you wanted to display
culture-sensitive dates (so that dates are displayed differently based on the country
and/or language), you first have to set the EnableScriptGlobalization property of the
ScriptManager control to true. This ensures that the current culture is serialized and sent
to the browser for the ASP.NET AJAX client library to correctly process the desired date
format based on the specified culture settings.


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