Copied to clipboard

Flag this post as spam?

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


  • Seweb_Francesca 16 posts 86 karma points
    Oct 07, 2016 @ 11:00
    Seweb_Francesca
    0

    file json

    Hallo, i need to use some json file to load combobox, I wrote the code in my template. I have to load

    how i can use them?

    in the old site i have this function.

  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Oct 07, 2016 @ 13:43
    Alex Skrypnyk
    0

    Hi Sewen,

    Did you parse json already?

    You can use this code for parsing -

                string file = Server.MapPath("~/App_Data/output.json");  
                string Json = System.IO.File.ReadAllText(file);  
                JavaScriptSerializer ser = new JavaScriptSerializer();  
                var personlist = ser.Deserialize <List<T>> (Json);  
    

    What do you mean to load combobox?

    Render radiobutton list from json?

    Thanks,

    Alex

  • Seweb_Francesca 16 posts 86 karma points
    Oct 10, 2016 @ 07:35
    Seweb_Francesca
    0

    Yes, thanks, I'll try it!

  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    Oct 10, 2016 @ 13:21
    Alex Skrypnyk
    0

    It would be great if you will share your code with us. And we will solve it together.

    Thanks,

    Alex

  • Casper 70 posts 308 karma points
    Oct 10, 2016 @ 08:23
    Casper
    0

    I think this could help you out?. https://plnkr.co/edit/MaCgoj

Please Sign in or register to post replies

Write your reply to:

Draft