title: ASP.NET VB DropdownList
body: <p>Simple problem.</p>
  
  <p>I have a dropdownlist and I want to set it's value on page_load.</p>
  
  <pre><code>&lt;asp:DropDownList ID="SubmissionTypeDD" runat="server"&gt;&lt;/asp:DropDownList&gt;
  </code></pre>
  
  <p>I fill this dropdown using some database values, currently 22, 17 and 44</p>
  
  <p>Now I want this dropdown's selected value on page_load to be "17"</p>
  
  <pre><code>SubmissionTypeDD.SelectedValue = "17"
  </code></pre>
  
  <p>This does not work, it defaults to the top value regardless.</p>
  
  <p>I have tried putting this in "If IsPostBack = False Then" but no success.</p>
  
  <p>This is the code I use to fill the DD:</p>
  
  <pre><code>Dim readIntoTable As New SqlCommand("SELECT DISTINCT submissionTypes FROM dbo.submissionTypes ORDER    BY submissionTypes ASC", conn)
  conn.Open()
  
  SubmissionTypeDD.DataSource = readIntoTable.ExecuteReader
  SubmissionTypeDD.DataTextField = "submissionTypes"
  SubmissionTypeDD.DataBind()
  
  conn.Close()
  </code></pre>
  
  <p>Cheers!</p>