Trying to set the value of a Drop Down
<p>I am trying to set the value or text of a drop down to a value being pulled by the database, this is being passed through an Entity and when I debug i see the right hand side part of the code has the string value i want to match on the drop down but still when I do a step in and goes to the next line the left hand side still selects the -- Select -- item</p>

<p>I am trying to assign it as follows</p>

<pre><code>ddlMyDropDown.SelectedItem.Text = Clients.MerchandiseType.ToString();
</code></pre>

<p>WHEN STEPPING THROUGH IT</p>

<pre><code>ddlMyDropDown.SelectedItem.Text contains "--Select --"
Clients.MerchandiseType.ToString() contains "Sporting Goods"
</code></pre>

<p>ddlMyDropDown has an Item named "Sporting Goods" but it never selects it when I use the code above , I am not sure why. Is there anyway to achieve this?</p>

<p>I am not trying to change change any values , but to set the ddlMyDropDown to the Text in Clients.MerchandiseType.ToString(). The drop down will always have the text being passed on Clients.Merchandise.ToString();</p>

<p>Thank you</p>
