ControlDesigner.UpdateDesignTimeHtml Method ()
Refreshes the design-time HTML markup for the associated Web server control by calling the GetDesignTimeHtml method.
Assembly: System.Design (in System.Design.dll)
Themethod is called by the design host to update the display of the associated Web server control at design time, such as when the control has been modified. Also, a control designer can call the method after modifying values of the control to update the display of the control.
The following code example demonstrates how to respond to a Click event in a control designer to change the focus between regions in a multi-region control and use themethod to update the appearance of the control in the design host.
This code example is part of a larger example for the EditableDesignerRegion class.
' Handler for the Click event, which provides the region in the arguments. Protected Overrides Sub OnClick(ByVal e As DesignerRegionMouseEventArgs) If IsNothing(e.Region) Then Return End If ' If the clicked region is not a header, return If e.Region.Name.IndexOf("Header") <> 0 Then Return End If ' Switch the current view if required If e.Region.Name.Substring(6, 1) <> myControl.CurrentView.ToString() Then myControl.CurrentView = Integer.Parse(e.Region.Name.Substring(6, 1)) MyBase.UpdateDesignTimeHtml() End If End Sub
Available since 1.1