I have an ImageButton that loads different images (of differening sizes) based on a selection made by the user from a dynamic data list. This ImageButton is displayed beside the DetailView. I want to get the width of the DetailView (which is static) and the width of the ImageButton so I can set the width of the Div they are contained in to the sum of their width, plus a few px. Once I set the width of the DIV and I set and margins (left and right) are auto, the DetailView and ImageButton will be centered in the page. However, every way I've tried to get the ImageButton width, it is always zero. I've trying coding the ImageButton Load event and its PreRender event but I get zero in both cases. Do I need to check some other property, or another event, like maybe one from the form itself?
View Complete Post