Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

This is probably a longshot, but does anyone know of a way to resolve a name entered in a Silverlight textbox to a SharePoint User object in Silverlight, using the client object model?

Ideally, I'd like to be able to have an object I can write back to a SharePoint List.

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

You should be able to resolve the user using code similar to these examples. I don't have a 2010 environment running at the moment but here's a suggestion:

var clientContext = new ClientContext("http://MyServer/sites/MySiteCollection");
var collGroup = clientContext.Web.SiteGroups;
clientContext.Load(collGroup,
    groups => groups.Include(
        group => group.Users.Include(
            user => user.Title,
            user => user.LoginName).Where(
                user => user.Title.Equals("John Smith"))));
share|improve this answer
    
Good enough for me! :) –  James Love Jun 15 '11 at 6:31
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.