Asp.net 单选按钮序列渲染



我有两个单选按钮(asp.net(作为rb1rb2GroupName在我的表单中Grp应用于两者。页面呈现时,需要先渲染rb2,最后渲染rb1

渲染序列是否有任何预定义属性?

例:

<asp:RadioButton ID="rb1" runat="server" Text="Radio Button1" GroupName="Grp" />
<asp:RadioButton ID="rb2" runat="server" Text="Radio Button2" GroupName="Grp" />

试试这种类型。

<asp:RadioButton ID="rbtn1" runat="server" GroupName="Grp" Text="Button1" />
<asp:RadioButton ID="rtbn2" runat="server" GroupName="Grp" Text="Button2" />

就个人而言,我更喜欢使用RadioButtonList:

<asp:RadioButtonList ID="rblSystem" runat="server">
<asp:ListItem Text="button1" Value="button1" />
<asp:ListItem Text="button2" Value="button2" />
</asp:RadioButtonList>

最新更新