I have created a Silverlight business application, that require the user to login, and once they have, their user name is presented in the login status.
Located in the ApplicationStrings.resx is the following-
<data name="WelcomeMessage" xml:space="preserve">
<value>Welcome {0}</value>
<comment>{0} = User.DisplayName property</comment>
</data>
I am trying to get the user name of whoever has logged in from this, I have tried-
string userName = System.Convert.ToString(ApplicationStrings.WelcomeMessage);
However this brings the string backs as Welcome {0}.
Whereas what I actually need is the value of User.DisplayName property.
How can I get to that value?
You need to use string.Format at the place where you retrieve the welcome message.