-1

///first I have crated Popular class for storing values

public class Popular
{
   public string   trk_mnetid,trk_title ,   art_mnetid, art_name,   image_url;
}

/// create popularplaylist class

public partial class PopularPlaylist : PhoneApplicationPage
{

 Popular popobj = new Popular();
    List<Popular> pop = new List<Popular>();

/* call json parsing it  and show only "titles" in List form when i m click on perticular title i need to show details  in next screen which i paser and store in popular popularplaylist class.
i use navigationservice  call new screen
*/

 NavigationService.Navigate(new Uri("/Popular_Module/PopularPlaylist.xaml", System.UriKind.Relative));

}

// plz tell me how to get list data in next screen

Mani
  • 1,364
  • 14
  • 33

1 Answers1

-1

Use querystring. Passing Value: In MainPage.xaml.cs add the following The easiest way to pass a parameter is just to use a string, something like:

private void btnNavigate_Click(object sender, RoutedEventArgs e)
{
   string url=String.Format("/Page1.xaml?parameter={0}",popular);
   NavigationService.Navigate(new Uri(url, UriKind.Relative));
}

Getting Value: In Page.xaml.cs add the following Note: It is important to override the OnNavigatedTo and after that you can use the NavigationContext to get the passed parameter.

protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
{
  base.OnNavigatedTo(e);   
  List<string> parameterValue = NavigationContext.QueryString["parameter"];   
}

Another popular syntax to get the value of the parameter is:

List<string> parameter = string.Empty;
if (NavigationContext.QueryString.TryGetValue("parameter", out parameter))
{
  //do something with the parameter
}
Mani
  • 1,364
  • 14
  • 33
  • Thank you so much for reply but by your way only pass single value i required to pass List Can u give me some example to use data in all application – Big data Hadoop dev. Apr 08 '13 at 05:24
  • Have edited the post to suite your question more. Give it a try. I hope references work well in c# too. – Mani Apr 08 '13 at 08:15