ASP.NET Pack Programmer's Guide
Diagram.SaveToString Method (SaveToStringFormat, Boolean)
See Also
 





Encodes the diagram contents into an ASCII string using the specified format and optionally clearing the Dirty flag.

Namespace: MindFusion.Diagramming
Package: MindFusion.Diagramming

 Syntax

C#  Copy Code

public string SaveToString (
    SaveToStringFormat format,
    bool clearDirty
)

Visual Basic  Copy Code

Public Function SaveToString( _
    format As SaveToStringFormat, _
    clearDirty As Boolean _
) As String

 Parameters

format
A member of the SaveToStringFormat enumeration.
clearDirty

Indicates whether the Dirty flag should be cleared.

 Return Value

A string containing the encoded diagram data.

 Remarks

The Base16 and Base64 formats represent the data returned by SaveToStream as an ASCII string. There are no special characters in the returned string, so the result can be easily stored in a database field or embedded into an XML document. That might be used also for transferring a diagram between a web page with embedded MindFusion.Diagramming for WebForms and a web server, passing the string as a value of a hidden HTML field.

When using Xml or CompressedXml as the first argument, the diagram is saved in XML format. The same format is supported by the SaveToXml and LoadFromXml methods. CompressedXml specifies that the XML document should be further compressed in ZIP format and base-64 encoded.

Exceptions

Exception type

Condition

NotImplementedException

When saving the diagram using the CompressedXml flag under .NET Framework 1.1 or earlier.

 See Also

SaveToString Method Overload List
Diagram Members
Diagram Class
MindFusion.Diagramming Namespace
LoadFromString Method
SaveToFile Method