All of the WebSchedule™ controls can have presets applied to them at run-time, using the LoadPreset method. This method has several overloads, taking a the name of the preset file, and a boolean.
The boolean determines if the control will be reset before the new preset is applied.
The code snippet below shows how to apply a preset at run-time, and reset the the control, and then reset the control’s WebScheduleInfo.
In Visual Basic:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e _ As System.EventArgs) Handles MyBase.Load Me.WebWeekView1.LoadPreset(Me.MapPath("Onyx.xml"), True) Me.WebWeekView1.WebScheduleInfo = Me.WebScheduleInfo1 End Sub
In C#:
private void Page_Load(object sender, System.EventArgs e) { this.WebWeekView1.LoadPreset(this.MapPath("Onyx.xml"), true); this.WebWeekView1.WebScheduleInfo = this.WebScheduleInfo1; }