asp.net.ph

CheckBox.TextAlign Property

System.Web.UI.WebControls Namespace   CheckBox Class


Sets or retrieves the alignment of Text associated with a CheckBox control.

Syntax


Inline <asp:checkbox textalign = enumValue ... >
Script CheckBox.TextAlign [ = enumValue ]

Property Value


enumValue One of the TextAlign enum values.

The property is read/write with a default value of Right.

Exceptions


Exception Type Condition
ArgumentException Occurs when the specified value is not one of the TextAlign values.

Remarks

Use the TextAlign property to specify the alignment of the text label associated with a CheckBox control. You can specify whether the text label appears to the right or left of the check box. Use the Text property to specify the label text.

Example

The below code snippet demonstrates how to set the TextAlign property at design time.

<asp:CheckBox id = "checkbox1" runat = "server"
   AutoPostBack = "True"
   Text = "Item Checked"
   TextAlign = "Right"
   onCheckedChanged = "Check_Clicked"/>
See Also

CheckBox Members Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph