Live Chat Icon For mobile
Live Chat Icon

How do I pass data between pages in a NavigationWindow ?

Platform: WPF| Category: Navigation

In most of the web based applications, there is a need to pass data between pages in order to perform specific tasks. Data can be passed between pages in the NavigationWindow using the overloads of the ‘Navigate()’ method in the ‘NavigationService’ class.

The following code snippet is used to pass data from one page to another.

[C#]

mypage newpage = new mypage();
window1.NavigationService.Navigate(newpage, empid);

For this to work, mypage class should contain a constructor defined as follows.

[C#]

public mypage(string empid)
{
	getempprofile(empid);
}

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.