Author: hahamaximus | Posted on: 4/13/2010 8:44:47 PM | Views : 369

Not sure what I'm missing, my code is:
        ddlPropertyType.DataTextField = "Name";
        ddlPropertyType.DataValueField = "PropertyTypeId";
        ddlPropertyType.DataSource = DBHelper.GetPropertyTypes();
        ddlPropertyType.DataBind();
        ddlPropertyType.SelectedIndex = -1;
Yet when the page loads, the dropdownlist is defaulting to the first item in the control, even though no item has "Selected" in the rendered HTML.
...

Go to the complete details ...