in

SharePoint Blogs

The Best Place for SharePoint-related Blogs

Mirjam's blog

Blogging about SharePoint related stuff

February 2007 - Posts

  • More presentations

    After presenting at the SharePoint Conference 2007 in Berlin more presentations are coming up. They will all be relatively close to home in the Netherlands.

    On March 23th I'm presenting at the SDE together with Dirk Zekveld. Our presentation will be on behalf of the Dutch Information Worker User Group (DIWUG).
    The session will be about: "Using the Windows SharePoint Services Feature Model to create and deploy custom solutions".
    Other people from DIWUG that are presenting are Marianne van Wanrooij and Rolf Eleveld on "Extending your Microsoft Office System: Word 2007" and Mart Muller on "ECM in MOSS 2007: Site Columns en Content Types".
    For more information please check the site:
    http://www.sdn.nl/Default.aspx?tabid=260

    On May 16th Dirk and I will present for the DIWUG about the Knowledge Network. The location for this presentation is still unknown.

    Last but not least I will give two presentations for TechNet on Search. One will be in Schiphol-Rijk, the other one will be in Barneveld. I'm not sure about the dates for these yet, but I will update this post as soon as more information becomes available.

  • The use of SPContext

    When building custom web parts for Windows SharePoint Services V3. You can use the SPContext object to get for instance the site or web from the current context.  But that's not all you can get from SPContext. You can also get the listitem and the webfeatures.

    In WSS V2 you would use SPControl.GetContextSite() or SPControl.GetContextWeb() but that's a lot less flexible and it's slower as well.

    A couple of different uses of SPContext are shown below:

    *************************************************************************

    SPList currentList = SPContext.Current.List;

    SPWeb currentSite = SPContext.Current.Web;

    SPSite currentSiteCollection = SPContext.Current.Site;

    SPWebApplication currentWebApplication = SPContext.Current.Site.WebApplication;

    *************************************************************************

    SPListItem item = (SPListItem)SPContext.Current.Item;

    *************************************************************************

    SPWeb site = SPContext.Current.Site.OpenWeb(guid);

    SPUser user = SPContext.Current.Web.CurrentUser;

    *************************************************************************

    SPSiteDataQuery siteQuery = new SPSiteDataQuery();

    siteQuery.Query = "<Where><Gt><FieldRef Name=\"ID\" />" +

        "<Value Type = \"Number\">100</Value></Gt></Where>";

    siteQuery.ViewFields = "<FieldRef Name=\"Title\"/>";

    DataTable queryResults = SPContext.Current.Web.GetSiteData(siteQuery);

    queryResults.TableName = "queryTable";

    queryResults.WriteXml("C:\\queryTable.xml");

    The last example makes use of the SPSiteDataQuery object.  In WSS V3 there are two different query objects. Besides SPSiteDataQuery object there is also the SPQuery object.
    The difference between the two is that SPQuery can only be used for queries within a single folder in a single list. SPSiteDataQuery can be used for cross lists and even cross site queries.

  • Presenting at the SharePoint Conference in Berlin

    Last week (11-14th February) I was in Berlin for the SharePoint Conference 2007.

    I attended quite a lot of interesting sessions, particularly from Patrick Tisseghem and Mike Fitzmaurice.

    But the most exciting part of the conference for me was the fact that I was asked by Bart Wessels from Microsoft to co-present his session on "SharePoint Designer 2007: Building No-Code SharePoint Solutions".  Bart did most of the story telling while I did the demo's.

    The contents of the session consisted of the following:

    • The Fantastic 40 templates
    • Solutions with Data View web parts
    • Demo of the Data View web part
    • Workflows in MOSS 2007
    • Demo about building workflows in SharePoint Designer
    • SharePoint Customization
    • Demo and best practices with Master Pages and Page Layouts

    All in all I really loved doing it and it generated a great adrenaline rush :-)


Need SharePoint Training? Attend a SharePoint Bootcamp!

Posts (c) their respective authors. Everything else (c) 2007 SharePoint Experts