title: How to trigger jquery ".change" event on dropdown select programatically c#
body: <p>I'm trying to automate html events using c#.<br>
  I have html dropdown and on change of its value it shows/hides specific divs.
  <br> Below is sample HTML code.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;body&gt;
  &lt;select id="ddl"&gt;
      &lt;option value="1" selected="selected"&gt;TextBox&lt;/option&gt;
      &lt;option value="2"&gt;Button&lt;/option&gt;
    &lt;/select&gt;
  
  &lt;input style="display: none" type="text" class="textboxclass" /&gt;
  
  &lt;div class="btn" style="display: none"&gt;
      &lt;button type="button"&gt;Submit&lt;/button&gt;
  &lt;/div&gt;
  
  &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  $('#ddl').change(function()
  {var name = $('#ddl option:selected').text();
  var id = $('#ddl option:selected').val();
  if(id =="1"){$('.textboxclass').show();$('.btn').hide();}
  else{$('.textboxclass').hide();$('.btn').show();}});
  &lt;/script&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I'm using mshtml.dll to read the HtmlDocument and I have to fire "change" event programmatically. 
  Tried different ways like below ones:<br> </p>
  
  <blockquote>
    <p>HTMLOptionElement drpelem.select=true;<br>  HTMLSelectElement
    elem.click();</p>
  </blockquote>
  
  <p><br> 
  But it's not working. Please guide me.</p>