2
I added it in the method where you load the list from the bank:
ddlSalas.Items.Insert(0, new ListItem("TODAS", ""));
When I choose this "ALL" option on dropdownlist
, happens a post on the page but it does not call the event selectedindexchanged
which contains the method that will load a gridview
with the information.
What could be going on? What I did wrong ?
Same thing @Thiago Falcão, when running, I choose the option and a post happens on the page but does not return anything and neither calls the breakpoint. When I select another one (which in the case is returning from the bank) it works, and after I chose an option that worked, I go back to it and it works.
– AndreeH
@Andreeh po cara, I think it should be getting lost in the index so, it seems that this first value is with negative index, try to see the Indice when you select the other items that enter the event, more or less so you will know which index is: switch (dropdownlist.Selectedindex) { case 1: // ..... some code here... break; case 2: // ..... some code here... break; case 3: // ..... some code here... break; default: // ..... some code here... break; }
– Thiago Friedman
Beauty @Thiago Falcão. I’ll try.
– AndreeH