Skip to main content
Home Forums Silverlight Programming Programming with .NET - General Loggedin Username
5 replies. Latest Post by tomchan on November 7, 2009.
(0)
tomchan
Member
1 points
5 Posts
11-07-2009 8:31 AM |
How can I get the logged-in username in my Silverlight Application? I created a sample application & I want to see the username on top of the application. Please help me in this scenario.
microsof...
Contributor
2904 points
566 Posts
11-07-2009 8:35 AM |
Use: Xaml1.InitParameters = "username=" + this.Request.ServerVariables["LOGON_USER"]; and then catch it from the code behind to display it...
11-07-2009 8:40 AM |
What is this InitParameters? Actually, I am new to Silverlight. How can I catch it from the code behind?
11-07-2009 9:01 AM |
InitParameter uses dictionary key/value pair to pass values from parent asp.net page to the silvelright application. You can catch it from the App.xaml.cs inside the Application_Startup event.
Sergey.B...
40 points
31 Posts
11-07-2009 10:17 AM |
I wrote a small blog post on this subject. You can find more inforamtion and sample source code here: http://dotnetspeak.com/index.php/2009/10/dynamically-setting-initialization-parameters-in-silverlight-application/
11-07-2009 12:38 PM |
Thank you guys.