Posts

Showing posts from January, 2010

Batch Updating List Items with SharePoint

  In SharePoint, sometimes you must update multiple items in a list. Creating a foreach loop to iterate through a list item collection and performing an Update on each list item can be very intensive. An alternative approach is to construct a Collaborative Application Markup Language (CAML) string that contains a batch of commands to perform the updates and execute the commands by using the ProcessBatchData command of an SPWeb object.   This example uses a document library named Processed Documents that contains a Processed yes/no field and Processed Date date field. You use a query to obtain a collection of items that have not been processed, as identified by their Processed value. You create a CAML statement to update the Processed and Processed Date fields for all documents in this library. After setting up the variables, you instantiate an SPList object for the Processed Documents document library by first instantiating an SPSite object and then an SPWeb ...

Microsoft SQL Server Migration Assistant 2008 for MySQL v1.0 CTP1

  Microsoft SQL Server Migration Assistant (SSMA) 2008 is a toolkit that dramatically cuts the effort, cost, and risk of migrating from MySQL to SQL Server 2008 and SQL Azure. Link: http://www.microsoft.com/downloads/details.aspx?FamilyID=0e6168b0-2d0c-4076-96c2-60bd25294a8e&displaylang=en

Configure web.config to use the Session for SharePoint 2010

By default, the Session State in SharePoint 2010 is disable. If you want to use the Session in SharePoint 2010, you must change the web.config:   Open the web.config of the SharePoint Site Set enableSessionState="true" in <pages> tag Add: <add name="Session" type="System.Web.SessionState.SessionStateModule" /> into <httpModules> tag Remove <remove name=”Session” /> in the <modules runAllManagedModulesForAllRequests="true"> tag   Now, having fun, you can use Session State in SharePoint 2010.

HttpWebRequest Helper for Silverlight

Ref: http://www.cameronalbert.com/post/2008/03/HttpWebRequest-Helper-for-Silverlight-2.aspx   I wrote this helper class to assist with processing an Http Request via Silverlight 2. Since we can't provide a custom class by deriving from BrowserHttpWebRequest because it is internal I wrote this helper that will create and send the request and raise an event when the request completes. I am using it in my current game to send commands to the server and process the responses. Edit: I revised the class slightly based on finding from Mike Briseno: Edit: Some folks have experienced issues with this class after installing Silverlight 2 Beta 2. Be sure to check your domain access policy xml file for the new changes in beta 2 but if you experience issues feel free to contact me and we can try and figure them out. Edit: Added HttpUtility.UrlEncode to the post values before writing them to the stream. Thanks for the suggestion Stefan ! using System; using System.Collections.Generic...