Haraka na rahisi: Utoaji Web Site Kutumia SharePoint Object Mfano Katika C #

I tried searching for a little snippet code that would show how I can create a new SPWeb in a site collection. I didn’t find it as quickly or easily as I expected so I thought I’d slap together a little entry on the subject.

Kanuni hii inajenga mpya Wiki tovuti:

 SPSite siteCollection;

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

    SPWeb w = siteCollection.OpenWeb();

    w.Webs.Add("xyzzy", "xyzzy Title",
        "xyzzy description", 1033, SPWebTemplate.WebTemplateWIKI, uongo, uongo);

My initial searches failed because I was looking for phrases like "provision a web site using sharepoint object model" and the like.

Kama wewe kutafuta for "Webs.Add()", utapata idadi ya washiriki muhimu sana blog, MSDN articles and SDK documentation that go into depth on this subject. I definitely recommend tovuti hii.

</mwisho>

Kujiunga na blog yangu.

Tags technorati:

3 mawazo juu ya "Haraka na rahisi: Utoaji Web Site Kutumia SharePoint Object Mfano Katika C #

  1. Rebecca Isserman
    I did this last year. I will say it was a lot easier to find resources last year. This year with more devs blogging it’s getting to be an information bog down. It has it’s good and bad qualities. We have more about stuff we didn’t know about last year, but we also have way too much on the same thing sometimes. There is a book by Todd Bleeker:
    It has some stuff about provisioning and hitting the object model a bit. I would say it’s one of the best books with information about the Object Model.
    Kujibu
  2. Tobias Zimmergren
    Hi,
    Usisahau kuhusu kutupa vitu baada ya wewe ni kosa nao. Huelekea kupata Nguruwe kabisa rasilimali kama mtu ana wengi desturi maombi ambapo moja haina kuchukua ovyo ya vitu maanani, hasa kama kuna mengi ya watumiaji wa concurrent.
    Makala hii inaeleza MSDN utupaji wa vitu badala vizuri, and takes up some examples of where the resources tend to run low if you forget about disposals 🙂
    Mimi kawaida kufanya kama;
    kutumia(SPSite someSite = mpya SPSite(http://litware.inc/)){
    //Do stuff here
    }
    Kujibu
  3. Hakuna jina
    WSS SDK ina mengi ya mifano. Kufikiri katika suala la SharePoint mfano kitu kweli inasaidia nimeona nje. Kama Sites ni kuhifadhiwa chini ya Ukusanyaji Site wewe bila kuangalia kwa ajili ya mali ya SPSite ambayo ina maeneo (SPSite.AllWebs). Kama mali hii ni mkusanyiko wa aina SPWebCollection ungependa kwenda huko na kupatikana nje ya matoleo mbalimbali ya mbinu ikiwa ni pamoja na kuongeza snippet kanuni.
    Kujibu

Kuondoka Reply

Anwani yako si kuchapishwa. Mashamba required ni alama *