錯誤是:不能使用的ClientIDMode,各國缺少在構建集引用
'System.Web.UI.WebControls.DropDownList' does not contain a definition for 'ClientIDMode' and no extension method 'ClientIDMode' accepting a first argument of type 'System.Web.UI.WebControls.DropDownList' could be found (are you missing a using directive or an assembly reference?)
的代碼是:
<asp:DropDownList ID="cbNames" ClientIDMode="Static" runat="server">
<asp:ListItem Value="" Text="<--Select Name-->" />
<asp:ListItem Value="0" Text="Name1" />
<asp:ListItem Value="1" Text="Name2" />
</asp:DropDownList>
我使用的.NET framework 4.0作爲構建框架。
是否需要對web.config文件進行更改以使.NET能夠識別該屬性?
告訴我們完整的標籤 – Adil
對格式化Adil抱歉,但有整個DropDownList。這是非常標準和直接的,但我認爲這是一個配置類型的問題,而不是代碼。謝謝 – rambini