Version

SavePreset(TextWriter,String,String,PresetType) Method

Saves the properties of a control to a file, so that they can be used by another control via the LoadPreset method.
Syntax
'Declaration
 
Public Overloads Sub SavePreset( _
   ByVal textWriter As TextWriter, _
   ByVal name As String, _
   ByVal desc As String, _
   ByVal presetType As PresetType _
) 
public void SavePreset( 
   TextWriter textWriter,
   string name,
   string desc,
   PresetType presetType
)

Parameters

textWriter
The Text writer in which to write the Preset File. The writer will not be closed at the end of the call, and should be closed afterwards.
name
The name the preset will have.
desc
A description of the preset.
presetType
The type of properties (Appearance, Behavior, or Both) which should be saved in this preset.
Example
Dim sw As System.IO.StreamWriter =  New System.IO.StreamWriter(Me.Page.MapPath("./MyPreset.xml")) 
Me.WebControl1.SavePreset(sw, "My Preset", "This is a description of my preset", Infragistics.WebUI.PresetType.All) 
sw.Close()
System.IO.StreamWriter sw = new System.IO.StreamWriter(this.Page.MapPath("./MyPreset.xml"));
this.WebControl1.SavePreset(sw, "My Preset", "This is a description of my preset", Infragistics.WebUI.PresetType.All); 
sw.Close();
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also