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
    0

    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>
                    <ul>
                        @foreach (dynamic d in Model.dampNewWide)
                        {
                            <li>
                                <img src="@DAMP_Helper.GetImageCropperUrl(d, "wideCrop")" alt="@d.ImageWide.nodeName"/>
                            </li>
                        }
                    </ul>

    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 

    Thanks

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

    nyone "?

  • David Brendel 792 posts 2970 karma points MVP 3x c-trib
    May 17, 2013 @ 09:45
    David Brendel
    0

    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:

Draft