Azkarra eta sinplea: Xedapen SharePoint Object Model erabiliz C web gune bat #

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.

Kode hau berria Wiki gune sortzen:

 SPSite siteCollection;

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

    SPWeb w = siteCollection.OpenWeb();

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

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

Baduzu bilatu for "Webs.Add()", blog oso erabilgarria da sarrera kopuru bat aurkituko duzu:, MSDN articles and SDK documentation that go into depth on this subject. I definitely recommend gune honetan.

</amaiera>

Nire blog Harpidetu.

Technorati Tags:

3 buruzko gogoeta "Azkarra eta sinplea: Xedapen SharePoint Object Model erabiliz C web gune bat #

  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.
    Erantzun
  2. Tobias Zimmergren
    Hi,
    Ez ez objektuak bota ahaztu zu haiekin egin ondoren. Joera baliabide Inhar nahiko eskuratu ditu ko asko aplikazioa, non ez da hartu objektuak eskura kontuan, batez ere, bada ez aldibereko erabiltzaile asko.
    MSDN artikulu honetan objektuak eskura deskribatzen baizik eta ondo, and takes up some examples of where the resources tend to run low if you forget about disposals 🙂
    Egin ohi dut atsegin;
    erabiliz(SPSite someSite = new SPSite(http://litware.inc/)){
    //Do stuff here
    }
    Erantzun
  3. Izenik ez
    WSS SDK adibide ugari baditu. SharePoint objektu ereduaren terminoetan pentsatzen benetan laguntzen aurkitu ditut. Web gune hauek bilduma pean gisa gordetzen bat SPSite jabetza dituen guneak eman nahi baduzu begiratu (SPSite.AllWebs). Jabetza mota hau SPWebCollection bilduma bat da gisa joaten ahal duzu eta aurkitu dituzten e metodoaren bertsio hainbat kodea mozkina barne.
    Erantzun

Utzi iruzkin bat

Zure e-posta helbidea ez da argitaratuko. Beharrezko eremuak markatu dira *