我想用它打印出HTML使用無序列表CheckBoxList控件
<UL>
<LI><INPUT CHECKBOX></LI>
<LI>etc</LI>
</UL>
爲標記一個CheckBoxList控件。
但是,如果我嘗試以下方法:
<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.
因爲unorderedlist是提供作爲RepeatLayout屬性值這似乎很傻。流程工作,這使他們都在一個跨度,表也是如此,但我想使用無序列表,並做自己的樣式。
大概 - 如何將我的項目轉換成.NET 4然後,如果這不是太瘋狂的想法? – deed02392 2012-03-15 14:22:15
只需右鍵單擊該項目,選擇目標框架「.NET Framework 4」。 – Carl 2012-03-16 11:09:51
太棒了。編輯您的答案,以便不依賴於該鏈接,我會接受。 – deed02392 2012-03-16 11:54:05