I have a drop down list connected to database, thus it has all the values from DB.
But i want its default value to be "--select one-- " which should not go into db on selection..it should be just shown there and if not selected from drop down list, it should give an error

Saineshwar BageriRank #115 · 19.6K reputationPosted Jan 28, 2015, 3:15 AM EST
And on submit button check that selectedindex of dropdown must not be -1
Jitendra KumarRank #760 · 3K reputationPosted Jan 28, 2015, 3:18 AM EST
add drop down list default value using this code.
ddlClass.Items.Insert(0, "Select Class");
ddlClass.SelectedItem.Value = "0";
Or
ddlTechnicalGuide.Items.Insert(0, new ListItem("Select", ""));
Saineshwar BageriRank #115 · 19.6K reputationPosted Jan 28, 2015, 3:21 AM EST