c# - How to get element from HTML -
hello trying insert ddl in html system.collections.arraylist
i making httpwebrequest , httpwebresponse
httpwebresponse redirectresponse = redirecttourl("https://servicestest.com/pages/trans.aspx"); stream streamresponse = redirectresponse.getresponsestream(); streamreader streamread = new streamreader(streamresponse); myhtmlpage= streamread.readtoend();
now have html page in myhtmlpage(streamread),and inside have dropdownlist data need store in system.collections.arraylist (or standart array if posible)
this pice of html page , here ddl id-ctl00_placeholdermain_accountsddl_ddlaccounts
need store
<div id="ctl00_placeholdermain_accountsddl_ddlaccountswarrper" class="positionrelative "> <select name="ctl00$placeholdermain$accountsddl$ddlaccounts" id="ctl00_placeholdermain_accountsddl_ddlaccounts" class="margin5 positionabsolute"> <option selected="selected" value="1" title=" thhh ">some info </option> <option value="2" title=" fff"> info </option> </select> </div>
sow ideas how can pul data myhtmlpage array?(server side)
you can use html agility pack parse html documents. might want that.
Comments
Post a Comment