Month: October 2008

SharePoint: Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION)

No Picture

I had a really strange error yesterday – when altering some pre-existing sharepoint code to ensure that spcontext.current.web.parentweb objects were disposed of correctly, I encountered the above error. Previously the code reinstantiated SPWeb objects from SPContext.Current.Web.ParentWeb.Url, rather than…

Read More »

SharePoint: Debugging Assemblies in the GAC (part 2)

No Picture

I wrote an article on debugging assemblies in the GAC some time ago, see Quicknote-Easy-way-to-debug-assemblies-in-the-GAC . There seems to be a lot of conflicting view about what is required out there on the web, and how the debugger…

Read More »

SharePoint: Using SPListItem in SPGridView Custom Template Columns

No Picture

In the past, where I have had to create custom columns for use in an SPGridView, I have created a class that implements ITemplate and have then got data from the datasource in the appropriate databinding event handler…

Read More »

SharePoint: SPWebConfigModification Note

No Picture

I’ve just been working on automating some changes to web.config using SPWebConfigModification. I have done this a while ago, but forgot the difference between two parameters (it is important that these are set correctly – if name is…

Read More »

SharePoint: Publishing Pages Programmatically

No Picture

A quick snippet of code on how to publish pages (as this is something I have been asked a few times): string pageUrl = “http://path/to/my/webpage.aspx”; using (SPSite site = new SPSite(pageUrl)) {     using (SPWeb web = site.OpenWeb())…

Read More »