Click here to Skip to main content
15,892,199 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello all,

I am bit new in C# and working in a project.
I have one page in Xaml containing buttons in which when click on it will navigate me to another page.

My requirement is that when i navigate to another page on clicking the button in first page i need some value in second page so that i figure out that which button is clicked.


Regards
Sunny

What I have tried:

i dont know how to do this. i think iuse this keywords.
Posted
Updated 21-Dec-16 20:47pm

 
Share this answer
 
Thanks Buddy its works.

As i passed the value from First page which redirect the value to the constructor of another page their i fetch the value and use.

First Page

private void ABC(object sender, RoutedEventArgs e)
{
if (win2==null)
{
win2 = new SecondPage(valuePassed);
win2.ShowDialog();
}

}

Second Page

String F;
public SecondPage(String FN)
{
InitializeComponent();
F = FN;
}

Here "ValuePassed" is passed from "firstPage" and in "SecondPage" i received it in Variable "FN" and then used.


Thanks
Regards
 
Share this answer
 

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