| |||||||||||||||||||||||
BorderStyle EnumerationSystem.Web.UI.WebControls Namespace Specifies the border style of a control. Members
RemarksThe BorderStyle enumeration represents the different border style options for a control. The width of the border is controlled by using the BorderWidth property of the WebControl class.
ExampleThe following example shows how to declaratively set the BorderStyle property of a Web control at design time. <asp:panel id = "myPanel" runat = "server" borderstyle = "ridge" borderwidth=3 bordercolor = "beige" /> The example below shows how to programmatically set the BorderStyle property at run time, depending on user input. The code also demonstrates how simple it is to retrieve the available system border styles and dynamically add each to a selectable list. void Page_Load ( Object src, EventArgs e ) {
if ( !IsPostBack ) {
ICollection borders =
TypeDescriptor.GetConverter ( typeof ( BorderStyle ) ).GetStandardValues ( );
foreach ( BorderStyle b in borders ) {
BorderSelect.Items.Add ( b.ToString ( ) );
}
}
myTable.BorderStyle = ( BorderStyle ) BorderSelect.SelectedIndex;
}
See Also |
| ||||||||||||||||||||||
Check out related books at Amazon
© 2000-2008 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 aspxtreme