-2

How to send data from one page to another page in windows phone 8 using c# other than by using query string method?

Bharadwaj
  • 21
  • 3

1 Answers1

0

In First page set value like this

 PhoneApplicationService.Current.State["Key"] = you value

In Second Page Get value which is set in First Page

 protected override void OnNavigatedTo(NavigationEventArgs e)
       {
         try
            {
             base.OnNavigatedTo(e);                   
              if (PhoneApplicationService.Current.State.Count > 0)
              {
               var val = (SpeedTest)PhoneApplicationService.Current.State["Key"];
          PhoneApplicationService.Current.State.Remove(AppConstant.SPEED);
               }  

              }
           catch (Exception ex)
           {
            }
      }
Jaihind
  • 2,770
  • 1
  • 12
  • 19