Below is the image code I'm working with:
<asp:Image runat="server" ID="imgLogo" Style="border-width: 0px; max-width: 100%; max-height: 200px;" onerror="showInvalidImageMessage();" onload="imageChanged()"/>
Even though I want to trigger a JavaScript event, it seems to be looking for a server-side handler.
Using jQuery's on
, bind
, or live
methods won't work in my case since the image control is generated dynamically.
When it comes to client-side events, we typically use onclientclick
for ASP buttons. I've also tried using onclientload
, but it doesn't seem to work. Is there a way to achieve this using pure JS?