if (!IsPostBack)
{
List<Country> countries = GetCountries();
// Add "Select" as the first item in the list
countries.Insert(0, new Country { Id = 0, Name = "Select" });
ddlCountries.DataSource = countries;
ddlCountries.DataBind();
}
}
private List<Country> GetCountries()
{
// Code to retrieve the list of countries from the database
// and return it as a List<Country>
// Replace this with your actual data retrieval logic
List<Country> countries = new List<Country>