title: Programmatically select an item from a drop down in .NET Webbrowser Control
body: <p>Below is a html script, I grabbed from a website. I wanna select the item programmatically using .NET </p>
  
  <pre><code>&lt;div id="MySite.condition_s-wrp" class="c-wrp-slctbx" style="z-index: 1;"&gt;
      &lt;input id="MySite.condition_s-input" type="text" autocomplete="off" readonly="readonly" tabindex="0" class=" c-slctbx-medium" style="width: 268px;"&gt;
      &lt;ul class="c-ul-slctbx max_height_300" style="width: 285px; display: none; top: 21px;"&gt;
          &lt;li id="MySite.condition_s-option-" class="c-li-slctbx"&gt;Please choose&lt;/li&gt;
          &lt;li id="MySite.condition_s-option-First" class="c-li-slctbx"&gt;First&lt;/li&gt;
          &lt;li id="MySite.condition_s-option-Second" class="c-li-slctbx"&gt;Second&lt;/li&gt;
      &lt;/ul&gt;
      &lt;select id="MySite.condition_s" name="attributeMap[MySite.condition_s]" class=" c-slctbx-medium" style="display: none;"&gt;
          &lt;option value=""&gt;Please choose&lt;/option&gt;
          &lt;option value="First"&gt;First&lt;/option&gt;
          &lt;option value="Second"&gt;Second&lt;/option&gt;
          &lt;/select&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Please note the following code is not working at all.</p>
  
  <pre><code>webBrowser1.Document.GetElementById("MySite.condition_s").SetAttribute("value", "First");
  </code></pre>
  
  <p>Any quick help will be highly appreciated.</p>