BLOG

Hyperlink Value From MOSS 2007 ListItem

26 November 2008 by Stuart Cam
A lot of snooping around Microsoft.Sharepoint.dll with Reflector gives the following:
// Get the Hyperlink (downcast from SPField to SPFieldUrl)
SPFieldUrl fieldUrl = (SPFieldUrl)spListItem.Fields[SPBuiltInFieldId.URL];
string urlID = spListItem[SPBuiltInFieldId.URL].ToString();
SPFieldUrlValue value = (SPFieldUrlValue)fieldUrl.GetFieldValue(urlID); 

Tags:

Categories: .NET | C Sharp | MOSS


© Codebrain 2017. All Rights Reserved. Registered in England: 07744920. VAT: GB 119 4078 13