2day i'm showing filling dropdown with numbers with in a range. by using a small for loop.
for that i created a function here. u need to pass 3 parameter to here dropdown name, from limit , to limit
Public void dropdown(DropDownList cbo, int _from, int _To)
{
cbo.Items.Clear();
for (int i = _from; i <= _To; i++)
{
cbo.Items.Add(new ListItem(i.ToString(), i.ToString()));
}
}
Have a nice day... 'N happy Coding :)
No comments:
Post a Comment