Christian Nwamba

Christian Nwamba

  • NA
  • 234
  • 75.2k

Working with Lists

Apr 10 2014 5:34 AM
  public static List<SelectListItem> Title()
        {
            List<SelectListItem> items = new List<SelectListItem>();
            items.Add(new SelectListItem { Text = "MR", Value = "" });
            items.Add(new SelectListItem { Text = "MRS", Value = "" });

            return items;
        }

Please in the above code. Is there any possible way to automatically populate the value with the the vallue of the Text. Thanks

Answers (6)