错误是:不能使用的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