A simple query , i want to populate the dropdownlist with number starting from 17 to 90 , and the last number should be a string like 90+ instead of 90. I guess the logic will be using a for loop something like:
for (int a = 17; a <= 90; a++)
{
ddlAge.Items.Add(a.ToString());
}
Also I want to populate the text and value of each list item with the same numbers. Any ideas?
Try this:
This is easy enough. You need to instantiate the ListItem class and populate its properties and then add it to your DropDownList.