动态生成RadioButton

来源:互联网 发布:sql 多结果 链接 编辑:程序博客网 时间:2024/04/30 00:21

 <asp:panel id="Panel1" runat="server">
</asp:panel>

CS:

for(int q=1;q<11;q++)
{
RadioButton RadioButton1=new RadioButton();
RadioButton1.ID="R"+q;
RadioButton1.Text="ljf-";
RadioButton1.GroupName="sss";
//Page.Controls.Add(RadioButton1);
Panel1.Controls.Add(RadioButton1);
}

原创粉丝点击