Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Passing a parameter to the next page. Phone 8 app

Posted on 2014-02-06
3
Medium Priority
?
269 Views
Last Modified: 2014-02-07
I would like to pass a parameter to the page that is being called.    

void ListBox_SelectionChanged(object sender,
                     System.Windows.Input.GestureEventArgs e)
        {
            int Test1 = 0;
            NavigationService.Navigate(new Uri("/OddsChartPage.xaml", UriKind.Relative));

string strMyParameter = "Yes";
?? Pass this parameter to OddsChartPage.xaml
        }

How can I do this?

Thanks,
0
Comment
Question by:Dovberman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 5

Accepted Solution

by:
Jeroen Timmermans earned 1600 total points
ID: 39841312
void ListBox_SelectionChanged(object sender,
                     System.Windows.Input.GestureEventArgs e)
        {
            int Test1 = 0;

            string strMyParameter = "Yes";

            NavigationService.Navigate(new Uri("/OddsChartPage.xaml?prm=" + strMyParameter, UriKind.Relative));
        }

Open in new window


and on OddsChartPage:

protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            string msg = "";
            
            if (NavigationContext.QueryString.TryGetValue("prm", out msg))

                textBlock1.Text = msg;

           
        }

Open in new window

0
 

Author Comment

by:Dovberman
ID: 39841752
Just what I needed.

Thanks
0
 

Author Closing Comment

by:Dovberman
ID: 39841753
Just what I needed.

Thanks
0

Featured Post

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

597 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question