Click to Rate and Give Feedback
Community Content
In this section
Statistics Annotations (0)
Collapse All/Expand All Collapse All
DocumentId..::.FindUrlById Method

Finds the URL of a document with the specified DocumentId value and versionLabel parameter value.

Namespace:  Microsoft.Office.DocumentManagement
Assembly:  Microsoft.Office.DocumentManagement (in Microsoft.Office.DocumentManagement.dll)
Visual Basic (Declaration)
Public Shared Function FindUrlById ( _
    site As SPSite, _
    docId As String, _
    versionLabel As String _
) As String
Visual Basic (Usage)
Dim site As SPSite
Dim docId As String
Dim versionLabel As String
Dim returnValue As String

returnValue = DocumentId.FindUrlById(site, _
    docId, versionLabel)
C#
public static string FindUrlById(
    SPSite site,
    string docId,
    string versionLabel
)

Parameters

site
Type: Microsoft.SharePoint..::.SPSite
ID to search for
docId
Type: System..::.String
SPSite object to search on
versionLabel
Type: System..::.String
Version of the label of the document for which to get the URL

Return Value

Type: System..::.String
URL of the document as a String. nullNothingnullptra null reference (Nothing in Visual Basic) if the document is not found, or if more than one document is found
ExceptionCondition
ArgumentNullException

SPSite object value is set to nullNothingnullptra null reference (Nothing in Visual Basic).

If there is more than one result, this method will return nullNothingnullptra null reference (Nothing in Visual Basic). In that case, use the FindUrlsById()()() method.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2012 Microsoft. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker