As the person aboved mentioned, this is generally when you're using
"Bind" on your dropdown box, and it's a null value. The easiest way I
know of to get around this is to add <ListItem Text="no value"
value="" /> as an item in your dropdown list, and set
AppendDataBoundItems = true
This will then select the
"no value" list item for database values that are null. This is much
simpler than the solutions above, and less complexity means less
chances for these to go awry.
An excellent article on this subject is below.
http://msdn.microsoft.com/en-us/library/ms366709.aspx
Here is an example of what I mean.
<asp:DropDownList ID="ddlEmployees" AppendDataBoundItems="true" SelectedValue='<%#Bind("EmployeeId") %>' runat="server" DataSourceId="ldsGetEmployees" DataTextField="FullName" DataValueField="EmployeeId">
<asp:ListItem Text="none" Value=""></asp:ListItem>
</asp:DropDownList>