Copied to clipboard

Flag this post as spam?

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


  • Stephen Davidson 216 posts 392 karma points
    Nov 24, 2012 @ 00:33
    Stephen Davidson
    0

    Display using razor in a foreach

    Hey All,

    Want to start using DAMP on a project and i current having it working using simple upload data type.

     <img src="/[email protected]("blogmainImage").Value&width=900&height=400&Constrain=False" alt="@n.GetProperty("uBlogsyContentTitle").Value" title="@n.GetProperty("uBlogsyContentTitle").Value" />

     

    I have changed the data type to DAMP 2.0 - New wide sample but I'm unsure how to integrate the razor code, would it be

     @foreach (DynamicNode n in nodes)

                    {

     

                        dynamic media = Model.dampProperty.First;

                        int slidecount = @n.Index() + 1;

                        string csstext = "slide" + slidecount;

     

                        <div id='@csstext' class="slide">

                              <a href="@n.Url">

     

     

                              <img src="/[email protected]&width=900&height=400&Constrain=False" alt="@n.GetProperty("uBlogsyContentTitle").Value" title="@n.GetProperty("uBlogsyContentTitle").Value" />

                              </a>

     

     

                        </div>

                    }

     

    TIA

    S

     

     

     

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies