JabbaTheNut
Programmer
I have a list box that is editable on the client side (i.e., adding items and deleting items). These edits are done in javascript. The problem I am having is that the count property of the list box is not providing a correct count. For example...
If the list box was initially empty when it went to the client and the client added 5 items through javascript, the following code evaluates to 0 instead of 5:
<code>
myList.Items.Count
</code>
In javascript, items are added to the list box as follows:
<code>
var newopt = new Option();
newopt.value = someValue;
newopt.text = someText;
myList.add(newopt, myList.options.length);
</code>
This javascript works great for adding items to the end of the list. Why does the code-behind not recognize the number of items?
Game Over, Man!
If the list box was initially empty when it went to the client and the client added 5 items through javascript, the following code evaluates to 0 instead of 5:
<code>
myList.Items.Count
</code>
In javascript, items are added to the list box as follows:
<code>
var newopt = new Option();
newopt.value = someValue;
newopt.text = someText;
myList.add(newopt, myList.options.length);
</code>
This javascript works great for adding items to the end of the list. Why does the code-behind not recognize the number of items?
Game Over, Man!