How can I get my JavaScript-added items to appear when I get to the .NET world?
I have an ASP.NET DropDownList server control which gets populated on the client side via JavaScript, like so:
var oOption = document.createElement('OPTION');
oOption.value = sText;
oOption.text = sText;
listbox.options.add(oOption);
When a postback occurs (via another control--this control does not have AutoPostBack set), this ListBox doesn't contain crap. It's empty.
I've tried checking it for contents in Page_Load() and in some of the handlers. Nowhere does it seem to arrive with the items I added through JavaScript.
I have an ASP.NET DropDownList server control which gets populated on the client side via JavaScript, like so:
var oOption = document.createElement('OPTION');
oOption.value = sText;
oOption.text = sText;
listbox.options.add(oOption);
When a postback occurs (via another control--this control does not have AutoPostBack set), this ListBox doesn't contain crap. It's empty.
I've tried checking it for contents in Page_Load() and in some of the handlers. Nowhere does it seem to arrive with the items I added through JavaScript.