Set Value of a Dynamically Generated DropDown
<p>I have a dropdown menu that gets automatically populated. I need to set its selected value to a certain option whose ID is being passed in. This code seems to work with dropdowns that were created on page load:</p>

<pre><code>    $('select[id$=DropDown1] option').each(function (index) {
        if ($(this).val() == _PassedInValue) {
            $(this).parent().val($(this).val())
        }
    })
</code></pre>

<p>But, it doesn't seem to work with dynamically generated content. Is there something I am missing or is there another way to approach this?</p>
