View/Edit Properties Links Broken


We have discovered that if a document library's name has been changed, the view/edit properties redirects are generating the wrong URL. In this case, the display name of the document library is used, not the folder name. I updated the original code with this (and did the same for "edit properties"):
string viewPropertiesUrl =
                        new string[] { folderUrl, itemId.ToString(), string.Empty });


cdog wrote May 19, 2009 at 8:07 PM

Good catch. I'll include this in the next build.

brettn wrote May 26, 2009 at 9:32 PM

Actually, we found another problem with this solution. The code change I made earlier will not work for documents that are contained inside folders within a library. The new code is:

string viewPropertiesUrl =
                        new string[] { siteUrl, documentLibrary.RootFolder.ToString(), item.ID.ToString(), string.Empty });
It would also be good to close the instances of SPWeb and SPSite

wrote Sep 29, 2009 at 1:08 PM

wrote Feb 13, 2013 at 2:29 AM