Asp.net中让textbox和RadioButtonList在同一行显示  在线等
    
    姓名:
    <asp:TextBox ID="tbName" runat="server" TabIndex="1"></asp:TextBox>
   
    <asp:RadioButtonList ID="RadioButtonList1" runat="server" RepeatColumns="2" 
            TabIndex="2" Width=120px>
        <asp:ListItem Value="男" Selected="True" Text="男">
        </asp:ListItem>
        <asp:ListItem Value="女" Text="女">
        </asp:ListItem>
        </asp:RadioButtonList>
       

解决方案 »

  1.   

    设置RadioButtonList 为横向排列
      

  2.   

    放在同一个<tr>里,分开两个<td>啊
      

  3.   

    <tr>
    <td><asp:TextBox ID="tbName" runat="server" TabIndex="1"></asp:TextBox> 
    </td>
    <td>
    <asp:RadioButtonList ID="RadioButtonList1" runat="server" RepeatColumns="2"  
      TabIndex="2" Width=120px>
      <asp:ListItem Value="男" Selected="True" Text="男">
      </asp:ListItem>
      <asp:ListItem Value="女" Text="女">
      </asp:ListItem>
      </asp:RadioButtonList>
    </td>
    </tr>
      
      

  4.   

    <div style="height:30px;">
    <div style="float:left">
    <asp:TextBox ID="tbName" runat="server" TabIndex="1"></asp:TextBox>
    </div>
    <div>
      <asp:RadioButtonList ID="RadioButtonList1" runat="server" RepeatColumns="2"  
      TabIndex="2" Width=120px>
      <asp:ListItem Value="男" Selected="True" Text="男">
      </asp:ListItem>
      <asp:ListItem Value="女" Text="女">
      </asp:ListItem>
      </asp:RadioButtonList>
    </div>
    </div>