title: How to programmatically set SelectedValue of Dropdownlist when it is bound to XmlDataSource
body: <p>I'm using <code>XmlDataSource</code> as the <code>datasource</code> for a <code>dropdownlist</code>.</p>
  
  <p>Now I want to set the <code>SelectedValue</code> of the drop down when the page initially loads. I have tried the <code>OnDataBound event</code> of the drop down in which I could see the total items. But setting the <code>SelectedValue</code> didn't work. In<code>OnDataBinding</code> event, I couldn't even see the total items probably because the list isn't bound yet?</p>
  
  <p>How can I set the selected index based on a value?</p>