J
Jonathan Wood
I'm dynamically creating a table on my Web form. Among other things, each
row contains an edit control and an ImageButton that performs a task based
on the value in that edit control.
I'm having the following problems:
1. When I create the ImageButton, I set it's CommandArgument property to a
value that indicates which item it is associated with. But how do I figure
out and reference the edit control associated with the button?
2. Also, I set my handler for the ImageButton using the following code
(which the editor basically wrote for me):
btn.Command += new CommandEventHandler(btn_Command);
void btn_Command(object sender, CommandEventArgs e)
{
// ...
}
It compiles just fine but a breakpoint at the top of btn_Command never gets
hit. Can anyone tell me what I'm missing here?
Thanks for any tips!
Jonathan
row contains an edit control and an ImageButton that performs a task based
on the value in that edit control.
I'm having the following problems:
1. When I create the ImageButton, I set it's CommandArgument property to a
value that indicates which item it is associated with. But how do I figure
out and reference the edit control associated with the button?
2. Also, I set my handler for the ImageButton using the following code
(which the editor basically wrote for me):
btn.Command += new CommandEventHandler(btn_Command);
void btn_Command(object sender, CommandEventArgs e)
{
// ...
}
It compiles just fine but a breakpoint at the top of btn_Command never gets
hit. Can anyone tell me what I'm missing here?
Thanks for any tips!
Jonathan