R
Roberto
Hi, i´ve a problem creating a button & asociating a method whith the click
event. i´ve this code:
{....
Button b=new Button();
b.CausesValidation=false;
b.Click+=new EventHandler(b_Click);
.....}
private void b_Click(object sender, System.EventArgs e)
{
Label1.Text="hola "+((Button)sender).ID;
}
And runin the web aplication, whith the debugger. The button is created, and
i click on it, and the method b_Click start to execute, there are not
problems, and finish the ejecution of the click, but the label text has not
changed!
It supose that is doing it, but does´nt work.
Pleasse someone could help me? If you don´t understund the problem, pleasse
tell me and i´ll explain another time.
Thanks very much.
event. i´ve this code:
{....
Button b=new Button();
b.CausesValidation=false;
b.Click+=new EventHandler(b_Click);
.....}
private void b_Click(object sender, System.EventArgs e)
{
Label1.Text="hola "+((Button)sender).ID;
}
And runin the web aplication, whith the debugger. The button is created, and
i click on it, and the method b_Click start to execute, there are not
problems, and finish the ejecution of the click, but the label text has not
changed!
It supose that is doing it, but does´nt work.
Pleasse someone could help me? If you don´t understund the problem, pleasse
tell me and i´ll explain another time.
Thanks very much.