This documentation is archived and is not being maintained.

ControlDesigner.SetViewFlags Method

Assigns the specified bitwise ViewFlags enumeration to the specified flag value.

Namespace: System.Web.UI.Design
Assembly: System.Design (in

protected void SetViewFlags (
	ViewFlags viewFlags,
	bool setFlag
protected void SetViewFlags (
	ViewFlags viewFlags, 
	boolean setFlag
protected function SetViewFlags (
	viewFlags : ViewFlags, 
	setFlag : boolean
Not applicable.



A ViewFlags value.


true to set the flag, false to remove the flag.

There are several flags that can be set. For example, use the SetViewFlags method to set the DesignTimeHtmlRequiresLoadComplete value of the current ViewControl property for the control designer, instead of the obsolete DesignTimeHtmlRequiresLoadComplete property.

The following code example shows how to use the SetViewFlags method to indicate that the template is in editing mode.

public override void Initialize(IComponent component)
    // Initialize the base
    // Turn on template editing
    SetViewFlags(ViewFlags.TemplateEditing, true);

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0