Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Gets the contents of the file object located at the specified URL as a string.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
Syntax
'Declaration
Public Function GetFileAsString ( _
url As String _
) As String
'Usage
Dim instance As SPWeb
Dim url As String
Dim returnValue As String
returnValue = instance.GetFileAsString(url)
public string GetFileAsString(
string url
)
Parameters
url
Type: System.StringThe URL for the file.
Return Value
Type: System.String
The contents of the file.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | url is null . |
Remarks
Use this method to get a string that contains the contents of the file object located at the specified URL.