Web Apps, listbox indexes - start at 0 or 1?
Posted on 2004-10-27
I've been programming Windows apps in .NET for awhile now, but web apps are new. I'm working on one right now that's giving me an error:
Specified argument was out of the range of valid values. Parameter name: 1
All I know is when I select any index initially other than 0 to fill in text boxes with, I have no problem. When I choose index 0, I get this error. Are you not supposed to use index 0 in a listbox or other control in a web app? And if that is the case, then my other problem is that index 1 chooses the second item, so that whatever's first in the listbox must (in my mind) be index 0, but I can't choose it in code. I'm so frustrated.