Hello,
I've created a dynamic button and checkbox and i want to create an event for
each one of them.
altough i've created the event and assigned them to each control, nothing
happens,
the event is not occurring.
What am i doing wrong?
this is my code for the checkBox:
CheckBox cb = new CheckBox();
cb.Text = "Text";
cb.Font.Bold = true;
cb.ID = "Friend_cb" ;
cb.Font.Name = "Tahoma";
cb.Font.Size = new FontUnit("16pt" );
cb.ForeColor = Color.Blue;
cb.Checked = false;
cb.CheckedChang ed += new System.EventHan dler(Show_OutSi de_TextBox);
cb.EnableViewSt ate = true;
this.form1.Cont rols.Add(cb);
private void Show_OutSide_Te xtBox(object sender, System.EventArg s e)
{
if (((CheckBox)sen der).Checked == true)
{
Create_Label(0, "<br><br>") ;
Create_OutSide_ Player_TextBox( );
}
}
Thanks,
Gidi
I've created a dynamic button and checkbox and i want to create an event for
each one of them.
altough i've created the event and assigned them to each control, nothing
happens,
the event is not occurring.
What am i doing wrong?
this is my code for the checkBox:
CheckBox cb = new CheckBox();
cb.Text = "Text";
cb.Font.Bold = true;
cb.ID = "Friend_cb" ;
cb.Font.Name = "Tahoma";
cb.Font.Size = new FontUnit("16pt" );
cb.ForeColor = Color.Blue;
cb.Checked = false;
cb.CheckedChang ed += new System.EventHan dler(Show_OutSi de_TextBox);
cb.EnableViewSt ate = true;
this.form1.Cont rols.Add(cb);
private void Show_OutSide_Te xtBox(object sender, System.EventArg s e)
{
if (((CheckBox)sen der).Checked == true)
{
Create_Label(0, "<br><br>") ;
Create_OutSide_ Player_TextBox( );
}
}
Thanks,
Gidi
Comment