I'm reading an html file and need to get the value of value
of the select
selected by the user, how to do it?
HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument();
var select = doc.DocumentNode.SelectNodes("//table//tr//td//select[@class='CC_CxComboBox']");
foreach (var item in select)
{
var _value = item... //"como pegar o valor do atributo value do select"
}
This is HTML
<table>
<tr>
<td Class='Tit08'>CNPJ: 09876543210000 - JOÃO DA SILVA </td>
<td Class='Tit08'>Grupo:
<select id='grupo' class='CC_CxComboBox'>
<option value=''>Selecione</option>
<option value=02161 selected>SÃO PAULO</option>
</select>
</td>
</tr>
</table>