Panel::HorizontalAlign Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets or sets the horizontal alignment of the contents within the panel.

Namespace:   System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

public:
property HorizontalAlign HorizontalAlign {
	virtual HorizontalAlign get();
	virtual void set(HorizontalAlign value);
}

Property Value

Type: System.Web.UI.WebControls::HorizontalAlign

One of the HorizontalAlign values. The default is NotSet.

Exception Condition
ArgumentOutOfRangeException

The horizontal alignment is not one of the HorizontalAlign values.

Use this property to specify the alignment of the elements in the Panel.

The following example illustrates how to right-align or left-align the controls within the Panel.

System_CAPS_noteNote

The following code sample uses the single-file code model and may not work correctly if copied directly into a code-behind file. This code sample must be copied into an empty text file that has an .aspx extension. For more information on the Web Forms code model, see ASP.NET Web Forms Page Code Model.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: