Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hallo, i need to use some json file to load combobox, I wrote the code in my template. I have to load from a file json like the following: { "REGIONCODE": [ {"value": "050", "text": "REG1"} , {"value": "028", "text": "REG2"} , {"value": "028", "text": "REG3"} ] }
how i can use them?
in the old site i have this function.
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
Yes, thanks, I'll try it!
It would be great if you will share your code with us. And we will solve it together.
I think this could help you out?. https://plnkr.co/edit/MaCgoj
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
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.
Hi Sewen,
Did you parse json already?
You can use this code for parsing -
What do you mean to load combobox?
Render radiobutton list from json?
Thanks,
Alex
Yes, thanks, I'll try it!
It would be great if you will share your code with us. And we will solve it together.
Thanks,
Alex
I think this could help you out?. https://plnkr.co/edit/MaCgoj
is working on a reply...