private void ChbBookName_CheckedChanged(object sender, System.EventArgs e)
{
if(ChbBookName.Checked)
this.TxtBookName.Visible=true;
else
this.TxtBookName.Visible=false;
}
{
if(ChbBookName.Checked)
this.TxtBookName.Visible=true;
else
this.TxtBookName.Visible=false;
}
然后选中checkbox后没什么反映啊
我用你的方法改了,没有用啊
private void Page_Load(object sender, System.EventArgs e)
{
// 在此处放置用户代码以初始化页面
if(!IsPostBack)
{
TextBox1.Visible=CheckBox1.Checked;
}
}private void CheckBox1_CheckedChanged(object sender, System.EventArgs e)
{
TextBox1.Visible=CheckBox1.Checked;
}