Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

WebBrowser.SaveToString Method


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)

public string SaveToString()

Return Value

Type: System.String
The string representation of the source for the currently displayed HTML content.


The HTML content to be saved is from a cross-domain location.

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.


Supported in: 5, 4

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

© 2015 Microsoft