开发者

Import/Read Combobox List from Web site and use in C# Combobox

I w开发者_JAVA技巧ish to read the two Combobox lists from this site: http://coinmill.com/

Then I wish to recreate that in C# 2010 Combobox.

Thank you.


Use the HtmlAgilityPack to download and parse the page at coinmill. Write an xpath expression or traverse the DOM to find the select tag you´re looking for in the HtmlAgilityPack document. Get the list of options, and load them into your list. Mind you: this code can (and probably will) break every time coinmill updates their website. Your xpath or dom traversing is basing itself on the current layout of that page, and it will change. You would be better off looking for a webservice that offers the data you are looking for.

Menno

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜