Hi nauna,
RegionInfo class can be used to get the detail of any country and it's other country related information like country name, country code, currency, native name and many more.
If we want to bind a DropDownList with the countries of world without creating database, then it will be the good option.
HTML
<asp:DropDownList runat="server" ID="ddlCountries" AppendDataBoundItems="true">
<asp:ListItem Text="Select Country" />
</asp:DropDownList>
C#
using System.Globalization;
protected void Page_Load(object sender, EventArgs e)
{
ddlCountries.DataSource = GetCountries();
ddlCountries.DataTextField = "Text";
ddlCountries.DataValueField = "Value";
ddlCountries.DataBind();
}
public List<ListItem> GetCountries()
{
List<RegionInfo> regionInfos = CultureInfo.GetCultures(CultureTypes.SpecificCultures).Select(x => new RegionInfo(x.LCID)).ToList<RegionInfo>();
List<ListItem> countries = (from region in regionInfos
select new ListItem()
{
Text = region.EnglishName,
Value = region.TwoLetterISORegionName
})
.Distinct()
.OrderBy(x => x.Text)
.ToList<ListItem>();
return countries;
}
If you want Database refer below link.