This post was originaly published on my previous blog and moved here. Some links and resources might not be up to date.

Lately I was looking for some example on how to replace the attachment in document library (SP2010) without changing the version number but without any results. If you’ve faced the same problem here is the solution

→ Read more

This post was originaly published on my previous blog and moved here. Some links and resources might not be up to date.

Few days ago I faced with the problem of linking to default view page of custom document library (for purposes of redirection with Source parameter after uploading new document and filling it’s meta data form).

At first I tried using SPList.Forms collection indexed with PAGETYPE enumeration as I found in article “How To Always Link to the Right Application Pages”. But every time I was trying to get the default view object this way:

var defaltViewUrl = documentLibrary.Forms[PAGETYPE.PAGE_DEFAULTVIEW].Url;
→ Read more

This post was originaly published on my previous blog and moved here. Some links and resources might not be up to date.

As I wrote previously the one of my recent projects was to create a new upload page for specific Document Library (based on custom list template) that will use Telerik Upload component (Silverlight) and will entirely replace OOB upload.aspx page. Looking for some suggestions how to do this I found few solutions but none of them met my criteria:

  1. Using SharePoint Designer for customizing default upload page - I’m not sure if this could apply to document library; I also rejected this option from start as non-programmatic approach because of problems in future development and maintenance
  2. New document template redirection trick - looks simple but this wasn’t enough elegant solution for me (I know - who cares, it’s SharePoint after all… ;-)
  3. Creating a custom action in ribbon and hiding the old one with javascript - the first part looks quite nice but the second is another hack; also, “Add new document” link at the bottom of default document library view still points to the standard /_layouts/Upload.aspx page…
  4. Creating a custom action in ribbon with custom rendering template for ribbon - very nice solution when you want to change upload pages for all lists on farm, but this is not applicable in my case; still “Add new document” link at the bottom remains

There were also other approaches like changing all related links with jQuery on client side but I would prefer some simple, elegant and server side solution that will not cause any problems on migration to the next version of SharePoint.

→ Read more

This post was originaly published on my previous blog and moved here. Some links and resources might not be up to date.

Welcome on my new blog (and also the first one).
In few days I plan to picture some of my first experiences with development in SharePoint 2010. They are related with my current project - custom upload form with Telerik upload control (Silverlight) that will entirely replace the standard OOB upload mechanism for custom document libraries.