Getting the current login name from SharePoint

Hi guys,

Recently I was creating a Web Part and I needed to get hold of the current login name for comparison. It was simple and didn’t require great amounts of code. Thanks you
SharePoint for making life easier.   Laughing 

string userName = SPContext.Current.Web.CurrentUser.LoginName;

Returns
domain\LoginName

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Comments

December 16. 2009 20:02

 insomnia cause

Intimately, the post is in reality the sweetest on this noteworthy topic. I agree with your conclusions and will thirstily look forward to your future updates. Just saying thanks will not just be enough, for the great lucidity in your writing. I will right away grab your rss feed to stay informed of any updates. Admirable work and much success in your business efforts!

insomnia cause

May 21. 2010 18:28

Designer handbags

I was reading something else about this on another blog. Interesting. Your position on it is diametrically contradicted to what I read earlier. I am still contemplating over the opposite points of view, but I'm tipped heavily toward yours. And no matter, that's what is so great about modernized democracy and the marketplace of thoughts on-line.

Designer handbags

June 15. 2010 13:19

Ashlea Darks

I don't believe this! :-)

Ashlea Darks

August 7. 2010 01:22

tag heuer aquaracer review

good ,you are<span id="result_box"><span title=""> Clever man, </span></span> <a href="http://tagheuer-replica.com/panerai-c-47.html">Panerai</a>, <a href="http://www.tagheuer-replica.com/hublot-c-20.html">HUBLOT</a> ,<a href="http://www.tagheuer-replica.com"><strong>Tagheuer-replica</strong></a>,I've add your post to my twritter.

tag heuer aquaracer review

August 16. 2010 15:46

Wordpress Themes

I was unaware of it till i read your post.Thanks for increasing my knowledge.

Wordpress Themes

August 17. 2010 13:04

vigrx

your site layout is very good

vigrx

August 17. 2010 13:09

vigrx

your site layout is very good

vigrx

August 26. 2010 23:15

Latesha Markt

What a wonderful idea. I am not totally sure if that is true, but who knows. Would you be kind enough to write another post, but from the opposing vantage point.

Latesha Markt

August 27. 2010 22:37

Luke

Love the post, I'll certaintly be back for more. Love - <a href="http://www.photographersinpa.com">Photographers in Pa</a>

Luke

August 28. 2010 00:11

Leon Tinius

Thanks a good deal! I truly enjoyed reading this.Looking through these posts and the information you've provided I can appreciate that I still have a lot of things to learn. I will keep reading and keep re-visiting

Leon Tinius

August 28. 2010 08:00

nude cams

Pretty good post. I just came across your site and wanted to say that I have really enjoyed reading your blog posts. Any way I'll be subscribing to your feed and I hope you post again soon.

nude cams

August 30. 2010 22:07

increase semen volume

your site layout is very good

increase semen volume

August 30. 2010 22:10

increase semen volume

your site layout is very good

increase semen volume

August 31. 2010 08:33

student driver magnetic sign

I found so many interesting stuff in your blog especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the enjoyment here! keep up the good work.

student driver magnetic sign

August 31. 2010 10:05

Nude Cams

Hello everybody. Just thought I’d drop a line. Lately I have become addicted to blogs I think. I will start reading a little and before I know it half the day is gone. Came upon this blog and I am just amazed how infinite the topics can be. Anyway, thanks from an information junkie.

Nude Cams

August 31. 2010 10:08

Nude Cam

Thanks for the great post. It reminds me that I have to bring more structure in to my blogging. Your blog is very interesting. Please let me know how to go for your rss blog.

Nude Cam

August 31. 2010 16:37

Emma Marston

Great information. Just had to tweet about it. You have my support :)

Emma Marston

September 1. 2010 20:48

Camgirls

I just came across this blog I was I am getting a 404 page not found when trying to access other posts I hope it gets fixed. Thanks

Camgirls

September 2. 2010 06:02

Terra Menzel

i thought this was a really great post to read. i'll check back for new posts by you!

Terra Menzel

Add comment


(Will show your Gravatar icon)  

  Country flag

biuquote
  • Comment
  • Preview
Loading



 

Dilbert of the day