List<UserInfo> userList = new List<UserInfo>(); protected void Page_Load(object sender, EventArgs e) { SPWeb web = SPContext.Current.Web; SPUserCollection U1 = web.Users; //include allusers and SiteUsers SPUserCollection U2 = web.AllUsers; SPUserCollection U3 = web.SiteUsers; foreach (SPUser user in U2) { UserInfo cs = new UserInfo(); cs.name = user.Name; cs.mail = user.Email; userList.Add(cs); } rptUsers.DataSource = userList; rptUsers.DataBind(); } } class UserInfo { public string name { get; set; } public string mail { get; set; } }
Kolay Gelsin...