At runtime, the text attribute of an imageButton is not available. How can I set it?
Mark <><
As it turns out, I guess my issue with using ig_getWebControlById was a matter of timing. I was doing some javascript tied to the initialize event on an HTMLEditor. Apparently that is too early for me to go looking for the WebImageButton. I have to wait until later and it returns the control.
When I try ig_getWebControlById or iged_getById for my image button it returns null. When I try document.getElementById for the same id, it works. But I can't use the setText method on what is returned in the document version. Help? Is there a typo in your solution?
You need to use the client-side object model (CSOM) of WebImageButton to set its text, specifically its setText() function.
var imgbtn = ig_getWebControlById("<% =WebImageButton1.ClientID %>");imgbtn.setText("My New Text");