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

Robin Pars, Laurence Moroney, and John Grieb

"Foundations of ASP.NET AJAX"

appendLine('Chapter 4 - ASP.NET Ajax Client Libraries');
sb.append('
');
sb.append('');
document.write(sb.toString());
}
In the preceding script snippet, a block of HTML is concatenated together to be sent
to the browser. Here you see that an instance of the Sys.StringBuilder class is created
with the initial string ??????, and additional lines are added using the appendLine
method. At the end, the entire content of the StringBuilder is thrown to the browser by
using the toString method of the StringBuilder instance. You can see the result of the
preceding script in Figure 4-9. This is a pattern you most certainly have already seen all
too often with the System.Text.StringBuilder class in the .NET Framework.
CHAPTER 4 ?–  ASP.NET AJAX CLIENT LIBRARIES 79
Figure 4-9. Generating HTML dynamically via JavaScript using the Sys.StringBuilder class
Summary
In this chapter, you learned about the JavaScript type extensions designed to enhance the
native types and associated utilities in JavaScript. You also learned about some of the
important classes in the Sys namespace of the ASP.


Pages:
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146