我想使用CheckBoxList控件,它使用
输出HTML<UL>
<LI><INPUT CHECKBOX></LI>
<LI>etc</LI>
</UL>
标记。
但是,如果我尝试以下内容:
<asp:CheckBoxList ID="lstShipsInScope" runat="server"
DataSourceID="ShipsInScope" DataTextField="Ship_Name" DataValueField="Ship_Id"
ondatabound="lstShipsInScope_DataBound" AutoPostBack="True"
RepeatLayout="unorderedlist" RepeatDirection="horizontal">
</asp:CheckBoxList>
我明白了:
Parser Error Message: Cannot create an object of type 'System.Web.UI.WebControls.RepeatLayout' from its string representation 'unorderedlist' for the 'RepeatLayout' property.
如果将无序列表作为RepeatLayout属性的值提供,那么这似乎很愚蠢。 Flow工作,它们全部放在一个范围内,表格也是如此,但我想使用无序列表并自己进行样式化。
答案 0 :(得分:9)
this可能会成为问题吗?
&#34;在Visual Studio 2010中,当您基于.NET 3.5框架创建项目时,Intellisense和Designer仍然可以像项目是.NET 4.0框架一样运行。&#34;
因此,智能感知提供了实际可用的选项,在这种情况下&#34; UnorderedList&#34;这是.NET 4.0的新功能。要解决此问题,请执行以下操作之一:
答案 1 :(得分:1)
{"campaign"=>{"somevalue"=>1, "nest"=>{"attr1"=>[1, 2, 3], "attr2"=>[1, 3, 4], "attr3"=>3}}}
重复方向应该是垂直的。