<asp:DropDownList runat="server" ID="Drop_bxje">
                <asp:ListItem Value=">" Text="大于等于">
                </asp:ListItem>
                <asp:ListItem Value=">" Text="小于等于">
                </asp:ListItem>
 </asp:DropDownList>
我想实现
<asp:DropDownList runat="server" ID="Drop_bxje">
                <asp:ListItem Value=">=" Text="大于等于">
                </asp:ListItem>
                <asp:ListItem Value=">=" Text="小于等于">
                </asp:ListItem>
 </asp:DropDownList>
可是我在写上’=‘后为何总是在报错
请问该如何实现

解决方案 »

  1.   

    <asp:ListItem Value=">=" Text="大于等于"> 
    这个问题奇怪的了,要那个"="做什么
      

  2.   

    <asp:DropDownList runat="server" ID="Drop_bxje"> 
                    <asp:ListItem Value="&gt;=" Text="大于等于"> 
                    </asp:ListItem> 
                    <asp:ListItem Value="&gt;=" Text="小于等于"> 
                    </asp:ListItem> 
    </asp:DropDownList> >要转义的
      

  3.   

    &lt; < 小于号或显示标记 
    &gt; > 大于号或显示标记 
    &amp; & 可用于显示其它特殊字符 
    &quot; " 引号 
    &reg; ® 已注册 
    &copy; © 版权 
    &trade; ™ 商标 
    &ensp;   半个空白位 
    &emsp;   一个空白位 
    &nbsp;   不断行的空白 
      

  4.   

    <asp:DropDownList runat="server" ID="Drop_bxje"> 
                    <asp:ListItem Value="'>='" Text="大于等于"> 
                    </asp:ListItem> 
                    <asp:ListItem Value="'>='" Text="小于等于"> 
                    </asp:ListItem> 
    </asp:DropDownList> 
      

  5.   

    asp:DropDownList runat="server" ID="Drop_bxje">
                    <asp:ListItem Value="1" Text="大于等于">
                    </asp:ListItem>
                    <asp:ListItem Value="0" Text="小于等于">
                    </asp:ListItem>
    </asp:DropDownList> 可以把把判断写在后台中:
    if(Drop_bxje.SelectedValue == "1")  
       //做什么这里写 select * 表 from where 字段 >=  
    if(Drop_bxje.SelectedValue == "0")  
       //做什么这里写
       //.....
      

  6.   

    呵呵,这个问题简单啊。正确如下:
    <asp:ListItem Value="&gt;=" Text="大于等于"> 原因是他将红色部分当做整体来处理了,当然会错了
    <asp:ListItem Value=">=" Text="大于等于"> 
      

  7.   

    必须转义 不转的话 就会把前面的“<”和=号前的“>”看成一对了 当然会报错啦!