if (!IsPostBack)
{
List 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 GetCountries()
{
// Code to retrieve the list of countries from the database
// and return it as a List
// Replace this with your actual data retrieval logic
List countries = new List Loading
Janarthanan SPosted May 25, 2023, 1:37 PM
Hi Vamsi,
May I know what type of help and support need and the code is incomplete.
Vishal YelvePosted May 25, 2023, 3:47 AM
Hi Vamsi,
What help you need??
VamsiPosted May 24, 2023, 6:18 PM
thanks i got it resolved already, thankx for trying
Mohamed Azarudeen ZPosted May 24, 2023, 5:38 PM
Hi vamsi what do u need help with and i think the code is not complete