Friday, March 31, 2006

Creating a link enabled document library using Windows SharePoint Services and ASP.Net 2.0

Most of you already know that Windows SharePoint Services v3 is totally ASP.Net 2.0 based but did you also know that you can already use ASP.Net 2.0 with Windows SharePoint Services 2003 as well. Check out my article on MSDN Belux - Creating a link enabled document library using Windows SharePoint Services and ASP.Net 2.0..

An interesting customisation for Windows SharePoint Services (WSS) is the ability to track relationships between documents. In this article we will create an extension for WSS which will allow users to link documents to each other. This extension will be written in .NET 2.0 code to demonstrate how you can use Visual Studio 2005 to enhance your SharePoint sites. To be able to create a document linking solution on WSS with ASP.NET 2.0, we will need to complete a number of steps: 1. Upgrading Windows SharePoint Services to ASP.NET 2.0 2. Creating a custom SharePoint list to store the relationships between the documents 3. Extend the SharePoint document library context menu 4. Add your custom administration page for linking documents

4 comments:

Anonymous said...

Thanks for the article link! I'm having a problem with the LinkTo.aspx webform. Both GetIconURL & GetFullUrl calls are blowing up. The code for these is not in the example. Are they in an assembly I need to reference? Any help will be appreciated! Here is the context:

GetIconURL(DataBinder.Eval (
Container.DataItem, "FileLeafRef").ToString())

GetFullUrl(DataBinder.Eval(
Container.DataItem, "FileLeafRef").ToString())

jopx said...

I will ask that they also add the full code for the article - to get you going again - check out the code beneath

protected string GetFullUrl(string sDocName)
{
return "/" + sFolderUrl + "/" + sDocName;
}

protected string GetIconURL(string sUrl)
{
SPFile _spfile = _spweb.GetFile(sUrl);
return _spweb.Url + "/_layouts/images/" + _spfile.IconUrl;
}

denap said...

we're trying to do something similar on MOSS 2007. ie, project documentation that is not all stored together but we want it all linked. So functional, design, user guide etc all linked together.

Have you used this solution on 2007?

jopx said...

I plan to write an update for it,... just watch my blog