title: Select Item in ASP DropDownList: doesn't work in FireFox
body: <p>This is so frustrating. I've done this a million times! For some reason, Firefox won't select an item in my drop down list. Why? (It works find in IE)</p>
  
  <p>ASPX PAGE</p>
  
  <pre><code>&lt;asp:DropDownList ID="ddlPlan" runat="server" CssClass="TDSelect" Width="250px" AutoPostBack="true" DataTextField="Plan_Name" DataValueField="Plan_ID" /&gt;
  </code></pre>
  
  <p>ASPX.VB CODE BEHIND</p>
  
  <pre><code>  Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
  
      Try
  
        GetQueryStringInfo()
  
        If Not Page.IsPostBack Then   
          InitDropDowns()
          LoadTasks()
          SetUI()  
        End If
  
      Catch ex As Exception
        lblResults.Text = "Error loading page: " &amp; TeamDynamix.Error.TDError.HandleException(Me.DbConnStr, Me.UID, ex) &amp; ": " &amp; ex.Message
      End Try
  
    End Sub
  
    Private Sub InitDropDowns()
  
      'Plan'
      'LOAD PLANS'
      Using oDR As SqlClient.SqlDataReader = Common.GetSPDataReader(Me.DbConnStr, "PlansSelect", _
                    Common.MP("@UID", SqlDbType.VarChar, 40, Me.UID), _
                    Common.MP("@TID", SqlDbType.Int, 4, Me.TID))
  
        If oDR.HasRows Then   
          ddlPlan.DataSource = oDR
          ddlPlan.DataBind()   
        End If
  
        'Clean up'
        oDR.Close()
  
      End Using
  
      'INSERT BLANK ITEM'
      ddlPlan.Items.Insert(0, "")
  
      'IF PLANID IS SET, SELECT APPROPRIATE PLAN'
      If PlanID &gt; 0 Then    
        If ddlPlan.Items.FindByValue(PlanID) IsNot Nothing Then
          ddlPlan.SelectedValue = PlanID
        End If    
      End If
  
    End Sub
  </code></pre>
  
  <p>I've examined the rendered HTML by viewing source in FireFox. It appears to create the  element correctly, and all the options (values and text are set correctly), and it also puts selected="selected" on the appropriate item in the list! So I'm not sure why the item doesn't appear selected. NOTE: It's now working, read to end of this question to see the new "real" question...</p>
  
  <p>RENDERED HTML</p>
  
  <pre><code>&lt;select id="ddlPlan" class="TDSelect" style="width: 250px;" onchange="javascript:setTimeout('__doPostBack(\'ddlPlan\',\'\')', 0)" name="ddlPlan"&gt;
    &lt;option value=""/&gt;
    &lt;option value="517"&gt;(Copy of) AAA&lt;/option&gt;
    &lt;option value="500"&gt;(Copy of) andrew test&lt;/option&gt;
    &lt;option value="249"&gt;(Copy of) Test&lt;/option&gt;
    &lt;option value="359"&gt;Brandon's Test&lt;/option&gt;
    &lt;option value="472"&gt;BTEST2&lt;/option&gt;
    &lt;option value="1498"&gt;Date Issue Test&lt;/option&gt;
    &lt;option value="1516"&gt;Date Issue Test&lt;/option&gt;
    &lt;option value="1529"&gt;Date Issue Test&lt;/option&gt;
    &lt;option value="367"&gt;Import&lt;/option&gt;
    &lt;option value="91"&gt;Task Import&lt;/option&gt;
    &lt;option value="331"&gt;Task Plan Import&lt;/option&gt;
    &lt;option value="332"&gt;Task Plan Template Test &lt;/option&gt;
    &lt;option value="520"&gt;test 456&lt;/option&gt;
    &lt;option value="1464"&gt;test 456&lt;/option&gt;
    &lt;option value="1520"&gt;test 456&lt;/option&gt;
    &lt;option value="1480"&gt;Test Checking Out&lt;/option&gt;
    &lt;option value="1527"&gt;Test Plan&lt;/option&gt;
    &lt;option value="560"&gt;TestPlan-B&lt;/option&gt;
    &lt;option value="1465"&gt;TestPlan-B&lt;/option&gt;
    &lt;option value="1521"&gt;TestPlan-B&lt;/option&gt;
    &lt;option value="605" selected="selected"&gt;Work Items&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p><strong>IT JUST STARTED WORKING</strong><br>
  I just posted and answer to this because it just started working for no apparent reason whatsoever. The question then becomes: Is there some sort of caching or any other mechanism in FireFox that would cause this behavior?</p>