asp.net 2.0 (VWD2005)下 
<asp:RadioButton ID="RB1" Text="男" runat="server" Checked=' <%# Bind("sex") %>' GroupName="sex"/> 
<asp:RadioButton ID="RB2" Text="女" runat="server" Checked=' <%# Bind("sex") %>' GroupName="sex"/> 
代码是这样的,我原来看微软的教程,好像可以对绑定取反,怎么做! 
先谢谢各位大侠了

解决方案 »

  1.   

    RadioButton一次只能选择一个,它会自动选择
      

  2.   

    <asp:RadioButton ID="RB1" Text="男" runat="server" Checked='  <%# Bind("sex") %>' GroupName="sex"/>  
    <asp:RadioButton ID="RB2" Text="女" runat="server" Checked='  <%# Bind("sex") %>' GroupName="sex"/>  
    ==
    用Eval可以取反,Bind不可以<asp:RadioButton ID="RB1" Text="男" runat="server" Checked='  <%# Eval("sex") %>' GroupName="sex"/>  
    <asp:RadioButton ID="RB2" Text="女" runat="server" Checked='  <%# ! Convert.ToBoolean(Eval("sex")) %>' GroupName="sex"/>  
      

  3.   

    <asp:RadioButton ID="RB1" Text="男" runat="server" Checked='  <%# Bind("sex").ToString()=="男"?true:false %>' GroupName="sex"/>