This is normal behavior for an HTML control SELECT.
If the selected property is not used, it always starts with the first element (index 0).
In many cases, I do not want this in ASP.NET, because I specifically want the user to select a parameter.
So what I do is add an empty element that I can check.
i.e.
<asp:DropDownList runat="server" DataSourceID="SomeDS" AppendDataBoundItems="true">
<asp:ListItem Text="Please select an option" Value="" />
</asp:DropDownList>
This way I can install a validator that checks if this value is empty, forcing the user to make a choice.
Marko source
share