error:'ddVehicleType' has a SelectedValue which is invalid because it does not exist in the list of items. Parameter name: value
<p>I have a dropdownlist as 'ddVehicleType' that is in edit field. iam getting value from database when page load. but the error is coming like</p>

<pre><code> 'ddVehicleType' has a SelectedValue which is invalid because it does not exist in the list of items.Parameter name: value   
</code></pre>

<p>my coding is,</p>

<pre><code>while (reader.Read())
                        {       
                                ddVehicleType.SelectedValue = reader["VehicleId"].ToString();

                        }    
</code></pre>

<p>design page,</p>

<pre><code>&lt;asp:DropDownList ID="ddVehicleType" runat="server" AppendDataBoundItems="true" CssClass="drop" DataSourceID="SqlDataSource2" DataTextField="VehicleType" DataValueField="VehicleId"&gt;
                &lt;asp:ListItem Value="0"&gt;-Select-&lt;/asp:ListItem&gt;
            &lt;/asp:DropDownList&gt;

            &lt;asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="&lt;%$ ConnectionStrings:TAXIConnectionString %&gt;" SelectCommand="SELECT [VehicleId], [VehicleType] FROM [VehicleMaster] WHERE ([Status] = @Status)"&gt;
                &lt;SelectParameters&gt;
                    &lt;asp:Parameter DefaultValue="Available" Name="Status" Type="String" /&gt;
                &lt;/SelectParameters&gt;
            &lt;/asp:SqlDataSource&gt;
</code></pre>
