|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Problems with ListBox ControlOn my web page, I want to let the user change the order of items in the
LISTBOX. I could do that using the javascript , but when the page is submitted the listbox is reset to its original values. what happenig here ? I am using ASP.Net with C# as the code behind The items in the DropDownList are stored in ViewState, so modifying the actual
DDL in the HTML DOM doesn't affect the ViewState, and thus when posted back to the server isn't reflected in the server-side DDL. You'll need to build some other scheme to submit that info to the server. Typically a hidden input that you manipulate from the same javascript that reorders the DDL. Then on the server you'll have to reorder the DDL based upon that hidden. -Brock DevelopMentor http://staff.develop.com/ballen Show quoteHide quote > On my web page, I want to let the user change the order of items in > the > LISTBOX. > I could do that using the javascript , but when the page is submitted > the > listbox is reset to its original values. > what happenig here ? > I am using ASP.Net with C# as the code behind >
Page values are lost
Specifying Width and Height properties as percentages navigate through multipage hiddenfield / htmlInputHidden ? more than one webroot Getting the ApplicationInstance in webcontrol? Help Dropdownlist doesnot allow child control. IE COntrol Catch the page closing event Image Web Control |
|||||||||||||||||||||||