Introduction
This tip shows how to pass values from one Silverlight application to another Silverlight application using WCF service.
Using the Code
- Create a simple WCF service which is used to set / get user Name. Check the below code snippet for
Iservice1
:
- Use session object to store the entered user name. Check the below code snippet for "
SetUserName
" method.
GetUserName
method is used to get the entered user name. check the below code snippet.![Image 3](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
- Create one Silverlight application to enter "User Name". Check the below code snippet.
![Image 4](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
Check below code snippet
![Image 5](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
- Create another application which is used to get the "User Name" and display it.
![Image 6](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
Check the below code snippet:
![Image 7](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
History
- 17th April 2014 - Initial
version
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.