If a website has a dropDownList, is it possible to extract all the values along with their ID using c#?
Thanks
As in:
<select name='dropDownList' >
<option value='0'>Watever</option>
<option value="1">Watever</option>
<option value="2">Watever</option>
<option value="3">Watever</option>
<option value="4">Watever</option>
I want to extract all the “value” as well as their corresponsing text.
If you use a ASP.NET site and add the dropdown list as element you can easily get/set the properties. If it´s not your site and you use a client to get to the html code you have to parse it. For html the HtmlAgilityPack is the best solution but you can also try to use regex if the query isn´t to complex.