To do this, we have a method with a similar signature to the
GetCompanyInfo method called GetBasicCode, which calls the CompanyInfoService web
service to provide data for this Label control. Here??™s the code for that method:
private string GetBasicQuote(string strTicker)
{
companyInfo.CompanyInfoService service = new
companyInfo.CompanyInfoService();
companyInfo.CompanyInfoResult result =
service.doCompanyInfo("UID", "PWD", strTicker);
StringBuilder theHTML = new StringBuilder();
theHTML.Append("
cellpadding='0' style='border-width: 0'>");
theHTML.Append(""); theHTML.Append("Bid "); theHTML.Append(" | "); theHTML.Append(result.bid); theHTML.Append(" |
");
theHTML.Append(""); theHTML.Append("Ask "); theHTML.Append(" | "); CHAPTER 10 ?– BUILDING A SAMPLE APPLICATION USING ASP.NET AJAX 236 theHTML.Append(result.ask); theHTML.Append(" |
");
theHTML.Append(""); theHTML.Append("Open "); theHTML.Append(" | "); theHTML.
Pages:
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
|