
Untitled
By: a guest on
May 7th, 2012 | syntax:
None | size: 0.48 KB | hits: 10 | expires: Never
How to display the information of a web page in a wpf application
string tickerid = "Bse_Prc_tick";
HtmlAgilityPack.HtmlDocument doc = new HtmlWeb().Load(@"http://www.moneycontrol.com/india/stockpricequote/computers-software/infosys-technologies/IT", "GET");
if(doc != null)
{
// Fetch the stock price from the Web page
string stockprice = doc.DocumentNode.SelectSingleNode(string.Format(".//*[@id='{0}']",tickerid)).InnerText;
Console.WriteLine(stockprice);
}
2585.55