Wednesday, July 18, 2012

sharepoint code to get SPUser from username string

String UserName= “Srikanth Kancharla”;

SPUser User= SPWeb.EnsureUser(UserName);

SPWeb.EnsureUser(): This mehtod will checks whether the specified user name belongs to a valid user of the website, and if the logon name does not already exist, adds it to the website.

1 comment:

  1. I really had a great time stopping by your site, it gives me a lot of information. You can also visit my site, thank you!

    triciajoy.com

    www.triciajoy.com

    ReplyDelete