一个按钮问题 在进行注册的时候 当点击我已阅读此协议时按钮才有效这是怎么实现的啊! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 在“点击我已阅读此协议时按钮”的这个按钮的Click事件中 是RadioButton吧?怎么可能没有呢,你在设计界面上双击它在你的代码中就会出现这个事件了 但那个根本不好使啊!是这个事件CheckedChanged 那就在这个事件中写button.Enabled=radiobutton.Checked; 别忘了你的button的Enabled属性默认为false protected void Page_Load(object sender, EventArgs e) { this.Panel1.Visible = true; this.Panel2.Visible = false; this.Panel3.Visible = false; this.Button1.Enabled = false; //RadioButton1.Attributes.Add("Check", "if (RadioButton1.Checked==true) return true;"); //RadioButton1.Check += new EventHandler(a); } protected void RadioButton1_CheckedChanged(object sender, EventArgs e) { Button1.Enabled = RadioButton1.Checked; } 是webform?不早说……把RadioButton的autopostback属性设为true 那就赶紧结贴给分吧,hiahia~~ 如何将DataTable绑定到水晶报表显示? 如何在标题栏中添加图标 用c#新建数据库后怎么立刻新建多个表? 新手ArrayList学习 如何将数据库里binary类型的数据显示成图像? 如何在Web.config中动态设置数据库连接串? 问一个关于赋值的问题 关于一个WinForm的问题请教?在线等! C#如何解密java中的des加密 如合组合一个控件名? C#怎么开发DCOM??? IE插件 Backspace 的问题(C#)
button.Enabled=radiobutton.Checked;
{
this.Panel1.Visible = true;
this.Panel2.Visible = false;
this.Panel3.Visible = false;
this.Button1.Enabled = false;
//RadioButton1.Attributes.Add("Check", "if (RadioButton1.Checked==true) return true;");
//RadioButton1.Check += new EventHandler(a);
}
protected void RadioButton1_CheckedChanged(object sender, EventArgs e)
{
Button1.Enabled = RadioButton1.Checked;
}
把RadioButton的autopostback属性设为true