Back Button help...

smithygreg

New member
Apr 2, 2012
1
0
0
Hi everyone. I am developing my first app and I am having a bit of a problem and not sure what it the general way to solve it..

My app does a scrape of a website and returns a list of results to a pivotpage...

I build a List<MyObject> where MyObject has all the data I am displaying then I bind it to the listbox using ListBox1.ItemsSource = MyList;

This part is working just fine and I can link out from there to a details page for each item in the list...

What I want is to be able to click the back button from the details page and have all of the listboxes still populated... Currently they are blank when I click the back button.

Is there some setting like "isPostBack" on ASP.NET that needs to be turned on?
Or do I need to store everything locally as well as display it and then repopulate it when the back button is clicked?
Or is there a better tool to display/bind my data to that is better at remembering it's state?

Thanks in advance...Sorry I don't have any code...I'm at work right now and it's on my home computer,,,

-Greg
 
You have to save page state yourself

Yes, that's a quite fundamental fact of WP7 programming: You have to save and restore any data that your page needs yourself.

Just check the OnNavigatedTo and OnNavigatedFrom page methods in the source code of any non-trivial WP7 app to see the code there to save and restore state.
 

Members online

Forum statistics

Threads
334,645
Messages
2,257,625
Members
428,726
Latest member
Infernodude74