May 27, 2007

Problem while getting ContentTypeId from url...

This behaviour is from Windows Sharepoint Services 3.0 (wss 3.0).

I have created a contenttype for building a document library with custom metadata information. When the user creates a file she will be redirected to a custom form. The redirection is established by a changing the default document template url in site content type-> advanced settings. While redirecting sharepoint adds some extra request parameter such as List Guid, contentTypeId, and source. The problem is that the contenttypeid does not exactly match the actual one. It partially matches such as while the actual one is sth like this;
0x0101090022F6F433E7D4D248BCDF8A67E8D30F70

the one that comes from url is
0x0101090022F6F433E7D4D248BCDF8A67E8D30F70009A93DD1A0BCCFF47B39D75B5390CA316

it adds some extra bytes there. I thought i could use the string.Contains method for partial matching but that would be a problem since content type id's are not entirely random and they declare some hierarchy. I guess it may be a bug.

No comments:

Post a Comment