MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

how to print users name in users profile page  (Mono Support )

Viewed 4360 time(s), 4 post(s) 12/18/2013 10:52:15 AMby sonap
sonap

sonap

12/18/2013 10:52:15 AM
Hello, I was wondering how is it posible to just print the name of the user whose profile I am currently watching.
To be more specific, I am editing the AboutMe.aspx and I want to print the user's name in a <div> element.

Thank you in advance,
Panos
This content has not been rated yet. 
475 Reputation 52 Total posts
imarusic

imarusic

12/18/2013 10:55:29 AM
Hi,

did you try to use username Url parameter?
This content has not been rated yet. 
3016 Reputation 428 Total posts
sonap

sonap

12/18/2013 11:12:02 AM
Hello!
Thanks a lot for your reply,

I haven't. You mean this:  <a href="<# ProfileUrl #>"><# Username #></a> ?

How is it used?

Thanks,
Panos
This content has not been rated yet. 
475 Reputation 52 Total posts
imarusic

imarusic

12/18/2013 11:16:21 AM
Hi,

take a look please at the folowing code snippet:

string username =  String.Empty;
if(UrlParams.UserProfile.UserName.HasValue)
    username = UrlParams.UserProfile.UserName.Value;
Regards.
This content has not been rated yet. 
3016 Reputation 428 Total posts