Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Mr A 216 posts 278 karma points
    May 16, 2013 @ 22:18
    Mr A

    How to get the selected crops dynamically

    hi , I have got three crops for damp , what i want is to show the image of selected crop , the razor example shows the specific crop in the code : 

    <h3 style="margin-top: 20px;">Razor DAMP new wide sample</h3>
                        @foreach (dynamic d in Model.dampNewWide)
                                <img src="@DAMP_Helper.GetImageCropperUrl(d, "wideCrop")" alt="@d.ImageWide.nodeName"/>

    In the above code widecrop is defined , what i want is to pass the client selected crop[from 3 crops] instead of defining the specific crop in the code , the crop should dynamically changed , so for instance if longcrop is selected then widecrop should be replaced by longcrop vice versa , is there any way of doin that , i just could find any solution for , 

    any alternatives or suggestion will be appreciated 


  • Mr A 216 posts 278 karma points
    May 17, 2013 @ 09:21
    Mr A

    nyone "?

  • David Brendel 786 posts 2949 karma points c-trib
    May 17, 2013 @ 09:45
    David Brendel

    Can't you just replace the "wideCrop" string with a dynamic string?

    So use: @DAMP_Helper.GetImageCropperUrl(d, dynamic_crop_name)

    Then you only have to get the selected crop you have to show.

Please Sign in or register to post replies

Write your reply to: