WebBrowser.SaveToString Method
Microsoft Silverlight will reach end of support after October 2021. Learn more.
Saves the source for the HTML content currently displayed in the WebBrowser as a string.
Namespace: System.Windows.Controls
Assembly: System.Windows (in System.Windows.dll)
Syntax
'Declaration
Public Function SaveToString As String
public string SaveToString()
Return Value
Type: System.String
The string representation of the source for the currently displayed HTML content.
Exceptions
Exception | Condition |
---|---|
SecurityException | The HTML content to be saved is from a cross-domain location. |
Remarks
You can only save HTML from the same domain as the Silverlight application. Attempting to save HTML from a cross-domain location will cause an exception.
Version Information
Silverlight
Supported in: 5, 4
Platforms
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.