2009-08-12 17 views

Odpowiedz

6

Zamiast tego użyłem tego pierwszego wiersza i zadziałało. dzięki, koleś :)

SPGroupCollection collGroups = SPContext.Current.Web.Groups; 

foreach (SPGroup oGroup in collGroups) 
       { 
        foreach (SPUser oUser in oGroup.Users) 
        { 
         Response.Write(oUser.Name); 

        Label l = new Label(); 
        l.Text = oUser.Name; 

        PlaceHolderContents.Controls.Add(l); 
        PlaceHolderContents.Controls.Add(new LiteralControl("<br/>")); 
       } 
      } 
11
using (SPWeb oWebsite = SPContext.Current.Site.OpenWeb("Website_URL")) 
{ 
    SPGroupCollection collGroups = oWebsite.Groups; 
    foreach (SPGroup oGroup in collGroups) 
    { 
     foreach(SPUser oUser in oGroup.Users) 
     { 
      Response.Write(oUser.Name); 
     } 
    } 
} 
+0

dziękuje człowiekowi, ale dostaję ten błąd. "http: // kermit: 91/ExternalFAQ/default.aspx" zawiera niedozwolony znak ":". co mam napisać zamiast "Website_URL"? –

Powiązane problemy