isolated storage in windows phone 8.1

52 Views Asked by At

I'm using VS 2015 to develop windows phone8.1 app. I have a text box and a button in page1.When I enter text in text box and click on the button, the entered text should get stored in the Isolated storage and it should be displayed on the next page.I am new to c#, Can anyone help me?

1

There are 1 best solutions below

2
igorc On BEST ANSWER

page1:(write value)

Windows.Storage.ApplicationData.Current.LocalSettings.Values["settingName"] = "settingValue";

page2 (read value):

Object settingValue = Windows.Storage.ApplicationData.Current.LocalSettings.Values["settingName"];
if (value != null)
{  
  //do your thing  
}