//The client side event ImageClick takes two parameters, sender and e. //Sender is the object which is raising the event //e is the ImageViewerEventArgs function WebImageViewer_ImageClick(sender, e) { var imageviewer = $find("WebImageViewer1"); // Returns the ImageItem associated with the event var imageItem = e.getImageItem(); // Gets the actual height of the image, not the height displayed in the // browser var imageHeight = imageItem.get_actualHeight(); // Gets the actual width of the image, not the width displayed in the // browser var imageWidth = imageItem.get_actualWidth(); // Get the index of the image item in the WebImageViewer's // ImageItemCollection var imageItemIndex = imageItem.get_index(); // Set the alt text of the image imageItem.set_altText("Image Item"); }
Me.WebImageViewer1.ClientEvents.ImageClick = "WebImageViewer_ImageClick"
this.WebImageViewer1.ClientEvents.ImageClick = "WebImageViewer_ImageClick";
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2