Author: brgdotnet | Posted on: 6/10/2010 4:07:24 PM | Views : 287

Adding a label control inside of a div will short circuit my image buttons onClientClick method call.

I have an Asp.net panel control. In that markup I have an image button control.
My image button when clicked will not call my Java Script method unless the image
button control is wrapped with a div or table <td> tag.
That is fine with me. However Just to the left of my image button I have a label control that must be on the same
line/row of my image button. If I wrap both the label control and image control in a div or td tag then
my Java Script method is not called. So somehow wrapping the label tag with a div or td results in the short
circuiting of calling my Java Script method.
Why is this? I must have my label and image button control on the same line, so that is the requirement.
I tired using a span tag instead of a div, but that does not work. Below is my Asp.net markup code.
    < ...

Go to the complete details ...