title: webBrowser setAttribute
body: <p>Here is the problem </p>
  
  <pre><code>&lt;input type='text'name='TextBox0001'/&gt;
  </code></pre>
  
  <p>For example to insert a value for the input of above is just by using this code :</p>
  
  <pre><code>foreach (HtmlElement he in webBrowser1.Document.All.GetElementsByName("TextBox0001"))
  {
  he.SetAttribute("value", "HI");
  }
  </code></pre>
  
  <p>That's okay but how do I insert a value for the counter if the html code written like below?</p>
  
  <pre><code>&lt;table&gt;
  &lt;tr id='set1_row1'&gt;
  &lt;td&gt; &lt;input type='text'name='counter'&gt;&lt;/td&gt;
  &lt;/tr&gt;
  
  &lt;tr id='set1_row2'&gt;
  &lt;td&gt; &lt;input type='text'name='counter'&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;/table&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>I am using c#  webBrowser.</p>