Quantcast
Channel: Web Forms
Viewing all articles
Browse latest Browse all 23244

dropdownlist

$
0
0

i have an array with several positisons and read the array position text like "abc" then it has to go to the dropdown and select the abcbut it is not selecting i tried this:

ddl.Items.FindByText(arr[2].ToString());

arr is returning abc then it has to select on dropdown the abc text but dont work

i'm creating dropdown like this:

int y = DateTime.Now.Year;
for (int i = y - 20; i <= y + 20; i++)
{
ddl.Items.Add(i.ToString());

}

i think its because its not adding text property but how can i do it in that for


Viewing all articles
Browse latest Browse all 23244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>