protected void Page_Load(object sender, EventArgs e) { ..... SqlDataReader dr1 = sqlcmd.ExecuteReader(); while (dr1.Read()) {//根据数据库情况循环添加的radiobuttonlist ...... list.SelectedIndexChanged += new EventHandler (list_SelectedIndexChanged);//注册事件 } //每个radiobuttonlist后面有一个textbox } void list_SelectedIndexChanged(object sender, EventArgs e) { if (list.SelectedValue.ToString().Trim() == "基本满意" || list.SelectedValue.ToString().Trim() == "不满意") { txt.Visible = true; //根据选择的值,textbox是否显示 } else { txt.Visible = false; } }现在的情况是每次点击radiobuttonlist,只有最后一个radiobuttonlist旁边的textbox会显示。
1 回答
- 1 回答
- 0 关注
- 665 浏览
添加回答
举报
0/150
提交
取消