string strUser = txtName.Text.Trim();
SPPrincipalInfo principalInfo = SPUtility.ResolveWindowsPrincipal(mySite.WebApplication,
strUser, SPPrincipalType.All, false);
if (principalInfo != null)
{
SPUser user = myWeb.EnsureUser(strUser);
...
...
...
}
NameSpace:
using Microsoft.SharePoint.Utilities;
No comments:
Post a Comment