title: How to insert string into combobox in webbrowser?
body: <p>I'm making a winforms application in C# that has a few textboxes.
  One for the name, one for subject and one for message.
  Everything works except for the combobox (dropdownlist) on the website.</p>
  
  <p>It's like this:</p>
  
  <ol>
  <li><p>[a drop-down list with words]</p>
  
  <ol>
  <li>Dr</li>
  <li>Mr</li>
  <li>Mrs</li>
  <li>Miss and so on...</li>
  </ol></li>
  <li><p>[Name] 
  enter a name</p></li>
  <li><p>[Subject] 
  enter a subject line here</p></li>
  <li><p>[Message] 
  enter a message here</p></li>
  </ol>
  
  <p>I want to programatically insert my string of text into the drop-down list. I mean like, if I type in "mr" in my application, it should find "mr" and then check like if the list item text = "mr" then continue.
  How can I do that?
  I tried to do it with indexes - which works, but that's not so user-friendly.
  Indexes starts from 0 and this is what my current code looks like:</p>
  
  <pre><code>HtmlElement hField = webBrowser1.Document.GetElementById("name_prefix");
  hField.SetAttribute("selectedIndex", "1");
  </code></pre>
  
  <p>I want something along the lines like</p>
  
  <pre><code>HtmlElement hField = webBrowser1.Document.GetElementById("name_prefix");
  hField.SetAttribute("selectedIndex", textbox1.Text);
  </code></pre>
  
  <p>but that did not work since it's a list with options and not a textbox.</p>