title: Reading String as HTML in c# and obtain Values of Elements by class
body: <p>I have a string in c# MVC controller which is HTML.</p>
  
  <p>eg: <code>&lt;html&gt;...&lt;head&gt;...&lt;/head&gt;&lt;body&gt;...&lt;div class="someClass"&gt;...&lt;/div&gt;&lt;div class="someClass"&gt;...&lt;/div&gt;&lt;div class="someClass"&gt;...&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;</code></p>
  
  <p>Now I want to get all values of elements where Class = someClass and place them in a string array. Is this possible without using string manipulation functions? Currently I am using string manipulation like this</p>
  
  <pre><code>string str = above String;
  if (str.Contains(@"&lt;div class=""someClass""&gt;"))
  {
  str = str.Remove(0, str.IndexOf(@"&lt;div class=""someClass""&gt;" + 22));
  // add the text in array until &lt;/div&gt; and move to next element
  </code></pre>
  
  <p>I am sure there is a way in c#. Can someone please guide me in the right direction.</p>
  
  <p><strong>Note: That the HTML string is not from File.</strong></p>
  
  <p><strong>Note: This is not a Javascript question. Although I would love to use Javascript in Controller for this one.</strong></p>