Difficulty setting custom DDL's value with JQuery
<p>EDIT2:  </p>

<p>I tried something new I added this line of code:</p>

<pre><code>$(self.ddlOwner + "option[value='" + this.owner_USER_ID +"']").attr("selected", "selected");
</code></pre>

<p>However this line of code does in fact set the value correctly but it does so on all the DDLs on the page.  So if the value is 1 all four DDLs I have on the entire page set the value = 1.</p>

<p>End Edit2</p>

<p>I have a custom control DropDownList.</p>

<pre><code>public class AssigneesDDL : System.Web.UI.WebControls.DropDownList
    {
    ...
    }
</code></pre>

<p>It gets populated onInit.  And from the server side I would use a property to set its value. </p>

<p>this property:</p>

<pre><code> public string ValueID
        {
            get { return base.SelectedItem.Value; }

            set
            {
                ListItem li = base.Items.FindByValue(value.ToString());
                if (li != null)
                {
                    li.Selected = true;
                }
                else
                {
                    ListItem li2 = new ListItem("", "");
                    base.Items.Add(li2);
                    li2.Selected = true;
                }
            }

        }
</code></pre>

<p>Now I need to select the value from the client side and I am trying to do so with some JQuery, without any luck.  </p>

<p>I have the Value captured but no idea how to set it.  I've tried both:</p>

<pre><code> $(self.ddlOwner).val(this.owner_USER_ID);
</code></pre>

<p>and</p>

<pre><code>$(self.ddlOwner + "option:selected").val(this.owner_USER_ID);
</code></pre>

<p>Anybody have any ideas?</p>

<p>EDIT:</p>

<p>Oh and I've tried:</p>

<pre><code>$(self.ddlOwner + "option:selected").text(this.owner_USER_ID);
</code></pre>

<p>this one actually adds a new line into the DDL with the right value, but it also adds that value to every DDL on my page. Which is odd.  Not really sure why it does that.</p>

<p>Self.ddlOwner is ("#" + ddl.clientID).  So I have the correct handle on the control.</p>
