Version

LoadPreset(TextReader,Boolean) Method

Sets properties on the control that effect Appearance, Behavior, or Both, based on the information in the predefined Preset File.
Syntax
'Declaration
 
Public Overloads Sub LoadPreset( _
   ByVal reader As TextReader, _
   ByVal reset As Boolean _
) 
public void LoadPreset( 
   TextReader reader,
   bool reset
)

Parameters

reader
A Text Reader that references a Preset File. The reader will not be closed at the end of the call, and should be closed afterwards.
reset
Whether to reset all properties on the control before applying the preset.
Example
Dim sr As System.IO.StreamReader =  New System.IO.StreamReader(Me.Page.MapPath("./Onyx.xml")) 
Me.WebControl1.LoadPreset(sr,True)
sr.Close()
System.IO.StreamReader sr = new System.IO.StreamReader(this.Page.MapPath("./Onyx.xml"));
this.WebControl1.LoadPreset(sr,true);
sr.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