asp.net.ph

TableRow.VerticalAlign Property

System.Web.UI.WebControls Namespace   TableRow Class


Sets or retrieves the vertical alignment of the contents in the row.

Syntax


Inline <asp:tablerow verticalalign = enumValue ... >
Script TableRow.VerticalAlign [ = enumValue ]

Property Value


enumValue One of the VerticalAlign enum values.

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

Remarks

Use the VerticalAlign property to specify the vertical alignment of the contents of the row. This property is set with one of the VerticalAlign enumeration values.

Example

The sample below shows how to programmatically set the VerticalAlign property of a TableRow at run time, depending on user input. The code also demonstrates how simple it is to retrieve the available system vertical align styles and dynamically add each to a selectable list.

void Page_Load ( Object src, EventArgs e ) {
   if ( !IsPostBack ) {
      ICollection v_aligns = 
         TypeDescriptor.GetConverter ( typeof ( VerticalAlign ) ).GetStandardValues ( );

      foreach ( VerticalAlign v in v_aligns ) {
         AlignSelect.Items.Add ( v.ToString ( ) );
      }
      AlignSelect.SelectedIndex = 2;
   }
   myRow.VerticalAlign = ( VerticalAlign ) AlignSelect.SelectedIndex;
}
  C# VB

See Also

TableRow 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