It provides an additional layer
that allows you to crop this data to the specified number of days by iterating through the
DataTable and removing rows beyond what you are interested in. So if you want to pull 10
days??™ worth of data, you can modify the query to Yahoo! iFinance accordingly or simply
remove all rows beyond number 10.
That??™s about it. This web method is present in a web service called DataTier.
Consuming the Web Service
As mentioned earlier, an ASP.NET GridView control will be used to display the historical
price data. So, in the
section of the second TabPanel, add a GridView
control named grdPriceHistory, and change a few properties as shown in the following
markup:
"White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="3"
Height="119px" Width="470px" Font-Size="9pt">
CHAPTER 10 ?– BUILDING A SAMPLE APPLICATION USING ASP.NET AJAX 240
Figure 10-10 shows the design for the price history pane.
Pages:
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336