Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

list of countries in .net mvc 5

ViewBag.country = from p in CultureInfo.GetCultures(CultureTypes.AllCultures & ~CultureTypes.NeutralCultures).OrderBy(c=>c.Name)
                          select new SelectListItem
                          {
                              Text = p.EnglishName,
                              Value = p.DisplayName
                          };
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #list #countries #mvc
ADD COMMENT
Topic
Name
8+1 =