小弟在程序调试时,在代码中明明加了 <asp:DropDownList ID="typeofproblem" runat="server" Width="88px">
                    </asp:DropDownList>
可是界面提示:DropDownList控件类的typeofproblem 必须放在存在runat=server
的语句内。这是什么原因????

解决方案 »

  1.   

    <form   runat="server">
    <asp:DropDownList ID="typeofproblem" runat="server" Width="88px">
    </asp:DropDownList>
    </form>
      

  2.   

    <td style="width: 337px; height: 26px" >
                        <asp:DropDownList ID="typeofproblem" runat="server" Width="88px">
                        </asp:DropDownList>
                        <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="确定" Width="59px" />(
                        加
                        <div style="display: inline; width: 16px; color: #ff3333; height: 19px">
                            *</div>
                        的为必填项目)<span style="font-family: 宋体"></span> <span style="font-family: 宋体"></span>
                        <span style="font-family: 宋体"></span>
                    </td>
    在td中加可以吗??小弟以前做c/s的,对于b/s很菜。
      

  3.   


    <asp:DropDownList ID="typeofproblem" runat="server" Width="88px">
    </asp:DropDownList>要放在form和form 之间
      

  4.   

    the mistake has been corrected!!thankyou!!