-1

Following is sample html code, Similar code i have in String variable and i need to read each values of only "select" and add it to some collection. Thanks in advance.

`

<head>

<title> Sample HTML </title>

</head>

<body>

<form id="form1" runat="server">

  <h3> Sample Example </h3>

  <p>Select items from the list<p> 

  <select id="Select1" runat="server">
     <option value="Text for Item 1" selected="selected"> Item 1 </option>
     <option value="Text for Item 2">Item 2</option>
     <option value="Text for Item 3">Item 3</option>
     <option value="Text for Item 4">Item 4</option>
     <option value="Text for Item 5">Item 5</option>
     <option value="Text for Item 6">Item 6</option>
  </select>   

</form>

</body>

</html>`
Nitish Katare
  • 1,147
  • 2
  • 12
  • 22

1 Answers1

0

You can use HTML Agility kit to read HTML. Visit the following link. How to use HTML Agility pack

https://htmlagilitypack.codeplex.com

Community
  • 1
  • 1