Copied to clipboard

Flag this post as spam?

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


  • Amir Khan 1199 posts 2567 karma points
    Aug 28, 2012 @ 23:07
    Amir Khan
    0

    Generating a CSV file from nodes

    Hi,

    I'm trying to generate a CSV file in the following format "value 1", "value 2", "value 3" etc.

    I'm having trouble figurign out how to get "," into a variable, or how to wrap anything in quotes in general.

    Any help would be appreciated, here's what I have so far. I've tried using the unicode value and a plain " in place of ", but neither are working.

    @inherits umbraco.MacroEngines.DynamicNodeContext
    @{
        var location_pages = @Model.AncestorOrSelf().Descendants("LocationsPage");
        var quotes = """;
                    foreach (var location_page in location_pages) {
                       
                        @location_page.facilityName @Html.Raw(quotes)
                        
                    }
                
    }
  • 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