Click here to Skip to main content
15,919,774 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to pass the data from a listbox at 1page to the 4 text box that at another page using listbox_selectionchange.

But i am new to this,

so far i had found alike coding and edit it as below,
C#
private void ListBox1_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            {
                string EmpId = (ListBox1.SelectedItem as ViewDataListBox.ServiceReference1.MyEmployee).EmpId ;
                NavigationService.Navigate(
                    new Uri(String.Format("/EditPage.xaml?EmpId={0}", EmpId), UriKind.Relative));
            }
        }


what should i put for at my editPage to call out the value?
Posted

1 solution

How are you hosting your service? If your service is hosted in IIS, it is possible that the application was recycled between the 2 calls. In this case the app domain is recreated and the static members loose their values.

If itz within the same app and different pages, then the simple solution is global instance to share across the pages.
 
Share this answer
 
Comments
hueikar 1-Jun-12 12:49pm    
i host my service at localhost.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900