在MVC3中,我希望通过Html.ListBoxFor方法更改Html.ListBoxFor输出,这样就可以不使用带有所有可用值(以及选中的值)的HTML列表框,而只是输出所选项的无序列表(UL、LI)问题是,我希望保持与ListBoxFor方法完全相同的方法签名,接受一个MultiSelectList对象和一个列表,该列表是所选的值。然后,我希望无序列表只将选定的项值(而不是键)输出为UL/LI html
if __name__ == '__main__': for _ in range(n): #n is the number of inputs #queue is a dict that splits the input and store the input as key and value pair.