title: VB.NET download html code tables
body: <p>I'm pretty new to vb.net and I have a big problem with a software I'm creating for my own use.</p>
  
  <p><strong>1. Background:</strong></p>
  
  <p>I have code in my software that downloads the source code of a webpage into a .txt file and filters out information it's looking for. For normal HTML code this works fine.</p>
  
  <hr>
  
  <p><strong>2. Problem:</strong></p>
  
  <p>The problem is when I can't target specific parameters in the HTML code because they're too vague.</p>
  
  <hr>
  
  <p><strong>3. Examples:</strong></p>
  
  <p>I can download this kind of unique HTML code and pass the variable (Brown in this case) to Strings in my software because it's on the same line of code making it unique:</p>
  
  <pre><code>&lt;div class="Performer_DataLabel"&gt;Hair Color:&lt;/div&gt; Brown&lt;/div&gt;
  </code></pre>
  
  <p>However I want to know how to search a specific table and its rows and cells (like this one below showing the code for 1 row and the 2 cells I'm interested in):</p>
  
  <pre><code>1.  &lt;tr&gt;
  2.      &lt;td class="paramname"&gt;
  3.         &lt;b&gt;Hair Color:&lt;/b&gt;
  4.      &lt;/td&gt;
  5.      &lt;td class="paramvalue"&gt;
  6.          Brown&amp;nbsp;
  7.      &lt;/td&gt;
  8.  &lt;/tr&gt;
  </code></pre>
  
  <p>The thing is that as you can see, "Hair Color:" can be any variable like "Eye Color" or "Height" and "Brown" can be any answer to that question. There's not enough unique code in these tables, rows or cells to target those lines of code specifically like when they're written on a single line.</p>
  
  <hr>
  
  <p><strong>4. I want:</strong></p>
  
  <p>To be able to search and target "Hair Color" in HTML code tables like in the above example  and search/target its answer (Brown in this case) in its adjacent cell and pass it into a String variable (I will always know that I'm looking for like "Hair Color" but I will never know beforehand the answer to the Hair Color question and that answer variable is what I want to find).</p>
  
  <hr>
  
  <p><strong>5. Conclusion:</strong></p>
  
  <p>What VB.NET code can I use to:</p>
  
  <p>1) Search/target HTML code tables that contains words like "Hair Color" or "Eye Color".</p>
  
  <p>2) Search/target their answer variables regardless of what they are. (Some questions may have a long range of possible answers, so an IF or SELECT CASE statement to predict/compare them right now is not an option)</p>
  
  <p>3) Pass the answer to a String in my software.</p>
  
  <hr>
  
  <p><strong>6. Note</strong></p>
  
  <p>The question (Hair Color), regardless of how many hundreds of lines the full source code is, is always on the same line within the row of the table (line 3).</p>
  
  <p>The answer is also always on the same line (line 6) in the row of the table.</p>
  
  <p>However the question rows themselves are not always on the in the same place of the table.</p>