This topic has not yet been rated - Rate this topic

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)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
public string GetFileAsString(
	string url
)

Parameters

url
Type: System.String
The URL for the file.

Return Value

Type: System.String
The contents of the file.
Exception Condition
ArgumentNullException

url is null.

Use this method to get a string that contains the contents of the file object located at the specified URL.

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ