button postback does not work

v_ganeshraju

Newcomer
Joined
Sep 7, 2004
Messages
3
Hi,

I have a dropdownlist and a button on my aspx page. If i have more than 90 items in the dropdownlist my button does not do postback. If there are less than 80 items in the dropdownlist, same button does postback now. I couldnt understand what is going on, can someone please help.

I tried to set the 'enableviewstate' property to false, then the button can do the postback, but the dropdownlist can not remember the selection.

Thanks so much!!!
Ganesh
 
Button could not postback

Hi Thanks so much for the reply!
I still have the problem. If i increase the loop, it doesnt work.

This works. The Button could postback.
for (int i=0; i<100; i++)
{
this.DropDownList1.Items.Add(new ListItem("Hello"));
}

But not this. Button could not postback.
for (int i=0; i<200; i++)
{
this.DropDownList1.Items.Add(new ListItem("Hello How r u"));
}

Notice that i have increased the loop from 100 to 200. Can this be due to Cache limit?

Thanks,
Ganesh


Robby said:
Verify the data in the list for special characters, there may be one that is hindering the postback.
 
I did the same test with a loop to 5000 yes five thousand and it works fine

try this instead...

for (int i=0; i<200; i++)
DropDownList1.Items.Add(i.ToString);
 
Back
Top