Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
65
How to swap images in webimageviewer to a aspImage control?
posted

hi,

How to swap images in webimageviewer to a aspImage control? I know how to do it in the selected index change event in the code behind..But i want it to happen in the click of webimageviewer without making a full page refresh either using a javescript or using AJAX .How can i do it? one more thing is that my webimageviewer control is in a content page .. pls help me out...

thanks in advance...

Parents
No Data
Reply
  • 28464
    posted

     Hello,

    Thanks for your interest in WebImageViewer and for your question. I personally believe that there are two possible approaches for solving this problem:

    1) You can use the client-side (CSOM) object model of WebImageViewer, and the set_ImageUrl property in particular to set the Url of a particular image item to something else. I believe a good starting point is to check out the CSOM section of the WebImageViewer control - there is plenty of great content there to get you started.

    2) You can place the WebImageViewer instance inside an UpdatePanel and use the sever side click event to change the image there. The asp:UpdatePanel will take care of "ajaxifying" the WebImageViewer so end users will not experience a postback refresh effect.

    Hope this helps. 

Children