为什么提示这样一个错误:类型“dropdownlist”控件“search_dep_id”必须放在具有“runat=server”的窗体标记内
<asp:dropdownlist id=”search_dep_id” runat=”server” datatextfield=”dep_name” datavaluefield=”dep_id”> </dropdownlist>
我已经放进去了啊
------解决方案-------------------- <form id= "form1 " runat= "server ">
//放在这里面
</form>
------解决方案--------------------不仅要放到form里面,而且form必须 runat= "server "
<form id= "Form1 " method= "post " runat= "server ">
<asp:dropdownlist id=”search_dep_id” runat=”server” datatextfield=”dep_name” datavaluefield=”dep_id”> </dropdownlist>
</form>
------解决方案--------------------同意楼上~~~