0

I have developed many apps for iOS, now i want to learn Windows phone development.

In windows phone i want to display data in my listView

I want to display this json data in my ListView,

      {
        "Event_Id":2673,
        "Event_Name":"Bruno Mars",
        "Event_Navigateurl":"bruno-mars",
        "IphoneImage":"http://mywebsite/images/6349764112819brunomars_34628_1_1_20130227170016.jpg",
        "Price":38.5,
        "SubCategory":"Rock and Pop",
        "SubCategoryURL":"rock-and-pop",
      },
     {

        "Event_Id":752,
        "Event_Name":"One Direction",
        "Event_Navigateurl":"one-direction",
        "IphoneImage":"http://mywebsite/images/634848503231825onedirection_34537_1_1_20110926162229.jpg",
        "Price":10,
        "SubCategory":"Rock and Pop",
        "SubCategoryURL":"rock-and-pop",
    },
   {
       . . . 
   }

Can any one suggest, how to display this json data from URL.

Please help i am new in Windows phone.

Thanks in advance.

1

1 Answer 1

2

please refer my Question. i had same query to bind the json data in listbox. so, Please refer this link.

How to bind Json data in windows phone

I hope you get the Solution of your query.

And for getting the json data from url. for that refer this code.

Public MyJson()
{
   String myUrl = "Your WebService URL";
   WebClient wc = new WebClient();
   wc.DownloadStringAsync(new Uri(myUrl), UriKind.Relative);
   wc.DownloadStringCompleted += new DownloadStringCompletedEventHandler(wc_DownloadStringCompleted);
}

private void wc_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
{
   var myData = e.Result;
   // You will get you Json Data here..
}

And finally you will get your Json Data Easily.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.