When the control (asp: ImageButton) is part of the "content placeholder" for the ASPX main page, .. / and ~ / are interpreted differently by IE11 and Chrome.
IE will respond, as expected, with the prefix ~ / to represent the root directory of the web application. IE is looking for a catalog of images (ImageUrl = "~ / images / Customer.jpg") one level below the root.
In Chrome, the file inserted in the main page will react as expected when using the .. / prefix when your images are in the directory at the same level as your “ASPX content file”. Chrome interprets ~ / in the same directory as the ".aspx content file". That is, Chrome looks for your image directory as a subdirectory of the directory where your "ASPX content file" is located.
As far as I know, asp: ImageButton is not amenable to javascript function. One of the workarounds is to create two image directories (where IE expects and where Chrome expects) with the corresponding jpg, png, gif, and other files.
source share