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
3338
How to install a dyncamic image to the imageviewer
posted

So I have a page that a user clicks on, it then selects the imageguid as the id, passes to another page with an imageviewer control on it.  All I want to do is set the image to the imageviewer.

here is some code form the intial page, using a infragrid and a templated column

 

 <asp:ImageMap runat="server"  ID="imgHotSpot"
                                        ImageUrl='<%# imageURL(DataBinder.Eval(Container.DataItem, "imageguid")) %>'
                                        HotSpotMode="PostBack" ImageAlign="Middle" Width="100px"
                                        onclick="imagemap_click">
                                  </asp:ImageMap>

 

I pretty much want to set the image url on the imageviewer control to a "imagequid" that i assign to it on page load... can't figure how... any help?

Parents
No Data
Reply
  • 4493
    Suggested Answer
    posted

    Hello,

    From what I see you are (may be) passing the imageguid as a GET parameter to the page with WebImageViewer and also you only have single image in WebImageViewer.

    What could you do, is to check for the provided Request parameter in the Page_Load event handler, and if it's there, to manually create ImageItem assigning it's ImageUrl in te contructor:

       11 protected void Page_Load(object sender, EventArgs e)

       12     {

       13         string ImageUrl = Request["imageguid"];

       14         ImageItem item = new ImageItem(ImageUrl, "alt text", "tooltip");

       15         this.wivDynamic.Items.Add(item);

       16     }

Children
No Data