私は2つのリストボックス(AとBを考慮)を持っており、右に移動してボタンを保存します
jqueryを使用して、最初にデータをAからBに移動します。これは、右に移動するために使用したコードです。
$(function () { $('#addCat').click(function () { $(".ListBox1 > option:selected").appendTo(".ListBox2"); sortlist(".ListBox1 > option"); sortlist(".ListBox2 > option"); selectAll(); }); $('#removeCat').click(function () { $(".ListBox2 > option:selected").appendTo(".ListBox1"); sortlist(".ListBox1 > option"); sortlist(".ListBox2 > option"); selectAll(); }); $('#addCount').click(function () { $(".ListBox3 > option:selected").appendTo(".ListBox4"); sortlist(".ListBox3 > option"); sortlist(".ListBox4 > option"); selectAll(); }); $('#removeCount').click(function () { $(".ListBox4 > option:selected").appendTo(".ListBox3"); sortlist(".ListBox3 > option"); sortlist(".ListBox4 > option"); }); $('.submit').click(function () { //selectAll(); return newAccountValidate(); }); $('.save').click(function () { //selectAll(); return editAccountValidation(); }); });
次に、[保存]ボタンをクリックします。コードビハインド(サーバー側)からリストボックスBからアイテムを取得しようとしていますが、アイテムを取得できず、アイテム数も0です。
リストボックスbitems.count=0を取得します
専門家はこの問題を解決する方法を教えてください。