Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 7th, 2012  |  syntax: None  |  size: 0.48 KB  |  hits: 10  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. How to display the information of a web page in a wpf application
  2. string tickerid = "Bse_Prc_tick";
  3. HtmlAgilityPack.HtmlDocument doc = new HtmlWeb().Load(@"http://www.moneycontrol.com/india/stockpricequote/computers-software/infosys-technologies/IT", "GET");
  4.  
  5. if(doc != null)
  6. {
  7.    // Fetch the stock price from the Web page
  8.    string stockprice = doc.DocumentNode.SelectSingleNode(string.Format(".//*[@id='{0}']",tickerid)).InnerText;
  9.    Console.WriteLine(stockprice);
  10. }
  11.        
  12. 2585.55