|
-
September 30th, 2009, 11:52 AM
#1
add values to dropdownlist
i have a code...
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
for (int i = 1; i <= 100; i++)
{
ListItem itm = new ListItem("i");
DropDownList1.Items.Add(itm);
}
}
I need to add values to a dropdownlist from 1 to 100...
but i get 100 i's displayed..
Please tell me how..
THanks
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|