0

while trying to get data from https://blockchain.info/ticker in my grid view, i'm finding the result in single coloumn whether i want it in different coloumn. i'm showing you my code and please give me a soloution.

public void ticker()
{
    WebClient webClient = new WebClient();

    dynamic result =webClient.DownloadString("https://blockchain.info/ticker");

    GridView1.DataSource = result;
    GridView1.DataBind();
}

[https://i.stack.imgur.com/nPjgS.jpg]

Marcel
  • 1,443
  • 2
  • 14
  • 24
vin
  • 1
  • Possible duplicate of [Convert JSON to DataTable](https://stackoverflow.com/questions/11981282/convert-json-to-datatable) – Harish Dec 14 '17 at 16:24

1 Answers1

0

It looks like your results in JSON format so you have to convert in the proper format to display well in GridView.

import Newtonsoft.Json 
dynamic result =JsonConvert.DeserializeObject(
webClient.DownloadString("https://blockchain.info/ticker"));

I hope it's help you, you can search more about it

thanks

Pradeep Kumar
  • 346
  • 2
  • 12