Yooj yim thiab ceev thaum: Provision ib lub Web Site uas siv SharePoint kwv qauv hauv C#

Kuv sim searching rau me ntsis snippet rau chaws uas yuav ua li cas kuv yuav tsim ib SPWeb tshiab nyob rau hauv ib qhov chaw sau ntawv. Kuv tsis nrhiav nws ceev nrooj los yooj yim raws li kuv paub zoo ces kuv xav tias kuv yuav ncuav ua ke me ntsis nkag teb chaws rau cov kawm.

Cov cai no ua ib qho Wiki site:

 SPSite siteCollection;

    siteCollection = tshiab SPSite("http://conchang-o9l8qi");

    SPWeb w = siteCollection.OpenWeb();

    w.Webs.Add("xyzzy", "xyzzy Title",
        "xyzzy hauj lwm", 1033, SPWebTemplate.WebTemplateWIKI, tsis tseeb, tsis tseeb);

Kuv thawj zaug kev luag tshawb tau tejyam vim kuv twb nrhiav tau rau cov nqe lus xws li "provision ib lub web site uas siv cov qauv kwv sharepoint" thiab cov zoo li.

Yog hais tias koj nrhiav rau cov "Webs.Add()", koj mam li nrhiav ib tug xov tooj uas pab tau heev blog nkag, Cov khoom MSDN thiab SDK cov ntaub ntawv uas yuav mus rau qhov tob no kawm. Kuv twv yuav raug hu kom qhov chaw nov.

</kawg>

Subscribe rau kuv blog.

Ntawv cim npe Technorati:

3 xav txog"Yooj yim thiab ceev thaum: Provision ib lub Web Site uas siv SharePoint kwv qauv hauv C#

  1. Rebecca Isserman
    Kuv puas xyoo tas los no. Kuv yuav hais tias yog nws yooj yim heev mus nrhiav kev pab tsaib no. Xyoo no muaj devs ntau blogging lawm yuav tsum muaj ntaub ntawv liaj. Nws muaj nws qhov zoo thiab phem qualities. Peb muaj ntau ntxiv txog cov khoom peb tsis paub txog rau tsaib no, tiam sis peb kuj muaj kev pheej nyob qhov qub tej thaum. Yog phau ntawv los ntawm Todd Bleeker:
    Nws muaj ib co khoom txog provisioning thiab ntaus lub nruas qauv kuj nce mentsis. Kuv xav hais tias yog ib yam ntawm cov phau ntawv zoo tshaj txog ntawm tus kwv qauv.
    Teb
  2. Tobias Zimmergren
    nyob zoo,
    Tsis txhob hnov qab txog pov cov khoom tom qab uas koj nyob nraum thiaj tau nrog lawv. Yuav tau kuj yog ib qhov chaw muab kev qhia npua yog ib tug muaj ntau daim ntawv kev cai uas ib tug tsis coj tau pov tseg ntawm qhov khoom ua xav, tshwj xeeb yog hais tias muaj ntau txhawb cov neeg.
    No MSDN Tshooj ntawv piav txog tej khoom siv pov tseg theej zoo, thiab yuav siv ib co piv txwv uas cov chaw muab kev pab yuav khiav tsis tau yog hais tias koj tsis nco txog pov tseg 🙂
    Kuv mas nyiam;
    siv(SPSite someSite = tshiab SPSite(http://litware.inc/)){
    //Khoom no
    }
    Teb
  3. Tsis muaj lub npe
    WSS SDK muaj ntau cov piv txwv. Xav nyob rau hauv cov nqe lus SharePoint kwv yeej qauv pab uas kuv tau pom tawm. Raws li qhov chaw uas muab nyob rau hauv lub Site Collection koj xav nrhiav ib tug ntawm cov SPSite uas muaj tej kev sib tham (SPSite.AllWebs). Li no yog ib phau ntawm hom SPWebCollection koj yuav mus muaj thiab pom tias muaj ntau lub versions txog ntawm txoj kev sib ntxiv nrog rau qhov chaws snippet.
    Teb

sau ntawv cia

Koj email chaw nyob yuav tsis muab luam tawm. Search cim *