Share via


SPWeb.GetFileAsString method

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)

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

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.

See also

Reference

SPWeb class

SPWeb members

Microsoft.SharePoint namespace