设置radioButton的值为隐藏,文本不隐藏,后台可获取

前台
 
   
          
           

               
               
           
          
       
<%#Eval("ID") %>
                    <%#Eval("Name") %>
               


后台
 protected void Button1_Click(object sender, EventArgs e)
    {
        foreach (RepeaterItem item in Repeater5.Items)
        {
            RadioButton radio = item.FindControl("RadioButton1") as RadioButton;
            if (radio.Checked)
               radio.Attributes["HidText"].ToString();
        }
    }

你可能感兴趣的:(ASP.NET开发)