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);
}
Permalink