我有一个包含值列表框的管理页面。用户还可以通过一些jquery更改值的顺序,从理论上讲,我们将保存该顺序,并且它将更改列表框中其他外来区域的显示顺序。
jQuery工作正常。当用户保存时,我使用此代码处理列表框:
index = 0;
foreach (ListItem item in lstProspectStatus.Items)
{
//Save that particular item's data, using index as the value for the
//display sequence field.
index++;
}
问题是,items集合返回控件填充时项目所在的顺序。客户端订单更改被忽略。
对于我来说,最好的方法是什么?