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

Robin Pars, Laurence Moroney, and John Grieb

"Foundations of ASP.NET AJAX"

Append(result.open);
theHTML.Append("");
theHTML.Append("");
theHTML.Append("Year High ");
theHTML.Append("");
theHTML.Append(result.yearHigh);
theHTML.Append("");
theHTML.Append("");
theHTML.Append("Year Low ");
theHTML.Append("");
theHTML.Append(result.yearLow);
theHTML.Append("");
theHTML.Append("");
return theHTML.ToString();
}
This function is similar to what you saw earlier in that it creates an instance of the
proxy to the Flash-db.com web service and an instance of the object type that contains the
results to the doCompanyInfo() web method call. It then generates HTML for a table using
a StringBuilder and places this HTML into the Text property of the Label control. Obviously,
populating a Label control is not the most ideal way to represent some data on the
screen, but it suffices just fine for the purposes of this sample. In such scenarios, it??™s best
to bind a typed data structure to one of the more sophisticated ASP.NET data-bound controls,
such as GridView or DataList.


Pages:
307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331