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

Robin Pars, Laurence Moroney, and John Grieb

"Foundations of ASP.NET AJAX"

Of course, the number 20 is completely an arbitrary
number. You could really configure it to be any number of days you want so long as historical
data is available for that particular ticker. After we get the data for this period, a GridView
control is used to display the information. You can see this in Figure 10-9.
Figure 10-9. The price history pane
CHAPTER 10 ?–  BUILDING A SAMPLE APPLICATION USING ASP.NET AJAX 238
This information is ultimately sourced from Yahoo! as CSV over HTTP. This CSV file is
returned from a call to the iFinance server at Yahoo! using a URL call similar this:
http://ichart.finance.yahoo.com/table.csv?s=MSFT&d=2
&e=4&f=2007&g=d&a=2&b=1&c=2006&ignore=.csv
This returns a CSV file with the following format:
Date,Open,High,Low,Close,Volume,Adj. Close*
3-Mar-06,26.81,27.16,26.74,26.93,45218800,26.93
2-Mar-06,27.02,27.10,26.90,26.97,41850300,26.97
1-Mar-06,26.98,27.20,26.95,27.14,53061200,27.14
Each data item is separated by a comma, and each line is separated by a carriage
return. To make this data easier to consume by the data retrieval and business logic tiers,
a web service consumes this HTTP service and exposes it as a structured DataTable.


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