System.Web 1.0.5000.0 2.0.0.0 Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details. System.Web.UI.WebControls.BaseDataList System.Web.UI.INamingContainer System.Web.UI.WebControls.IRepeatInfoUser System.ComponentModel.Editor("System.Web.UI.Design.WebControls.DataListComponentEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.ComponentEditor, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089") System.Web.UI.ControlValueProperty("SelectedValue") System.ComponentModel.Designer("System.Web.UI.Design.WebControls.DataListDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.IDesigner")

In this topic:

Introduction

Templates

Customizing the Appearance of the DataList Control

Display Direction and Layout

Security

Declarative Syntax

## Introduction

Use the control to display a template-defined data bound list. The control supports selecting and editing.

## Templates

The contents of the control can be manipulated by using templates. The following table lists the supported templates.

Template Name

Description

If defined, provides the content and layout for alternating items in the . If not defined, ItemTemplate is used.

If defined, provides the content and layout for the item currently being edited in the . If not defined, ItemTemplate is used.

If defined, provides the content and layout for the footer section of the . If not defined, a footer section will not be displayed.

If defined, provides the content and layout for the header section of the . If not defined, a header section will not be displayed.

Required template that provides the content and layout for items in the .

If defined, provides the content and layout for the currently selected item in the . If not defined, is used.

If defined, provides the content and layout for the separator between items in the . If not defined, a separator will not be displayed.

At the very minimum, the needs to be defined to display the items in the control. Additional templates can be used to provide a custom look to the control.

## Customizing the Appearance of the DataList Control

The appearance of the control may be customized by setting the style properties for the different parts of the control. The following table lists the different style properties.

Style Property

Description

Specifies the style for alternating items in the control.

Specifies the style for the item being edited in the control.

Specifies the style for the footer in the control.

Specifies the style for the header in the control.

Specifies the style for the items in the control.

Specifies the style for the selected item in the control.

Specifies the style for the separator between the items in the control.

You can also show or hide different parts of the control. The following table lists the properties that control which parts are shown or hidden.

Property

Description

Shows or hides the footer section of the control.

Shows or hides the header section of the control.

## Display Direction and Layout

The display direction of a control can be vertical or horizontal. Set the property to specify the display direction.

The layout of the control is controlled with the property. Setting this property to RepeatLayout.Table will display the in a table format, while RepeatLayout.Flow displays the without a table structure.

## Security

The DataList control can contain controls that enable users to enter information.

This control can be used to display user input, which might include malicious client script. Check any information that is sent from a client for executable script, SQL statements, or other code before displaying it in your application. You can use validation controls to verify user input before displaying the input text in a control. ASP.NET provides an input request validation feature to block script and HTML in user input.

For more information about security, see Securing Standard Controls, How to: Protect Against Script Exploits in a Web Application by Applying HTML Encoding to Strings, and Validating User Input in ASP.NET Web Pages.

## Declarative Syntax

`<asp:DataList AccessKey="string" BackColor="color name|#dddddd" BorderColor="color name|#dddddd" BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double|Groove|Ridge| Inset|Outset" BorderWidth="size" Caption="string" CaptionAlign="NotSet|Top|Bottom|Left|Right" CellPadding="integer" CellSpacing="integer" CssClass="string" DataKeyField="string" DataMember="string" DataSource="string" DataSourceID="string" EditItemIndex="integer" Enabled="True|False" EnableTheming="True|False" EnableViewState="True|False" ExtractTemplateRows="True|False" Font-Bold="True|False" Font-Italic="True|False" Font-Names="string" Font-Overline="True|False" Font-Size="string|Smaller|Larger|XX-Small|X-Small|Small|Medium| Large|X-Large|XX-Large" Font-Strikeout="True|False" Font-Underline="True|False" ForeColor="color name|#dddddd" GridLines="None|Horizontal|Vertical|Both" Height="size" HorizontalAlign="NotSet|Left|Center|Right|Justify" ID="string" OnCancelCommand="CancelCommand event handler" OnDataBinding="DataBinding event handler" OnDeleteCommand="DeleteCommand event handler" OnDisposed="Disposed event handler" OnEditCommand="EditCommand event handler" OnInit="Init event handler" OnItemCommand="ItemCommand event handler" OnItemCreated="ItemCreated event handler" OnItemDataBound="ItemDataBound event handler" OnLoad="Load event handler" OnPreRender="PreRender event handler" OnSelectedIndexChanged="SelectedIndexChanged event handler" OnUnload="Unload event handler" OnUpdateCommand="UpdateCommand event handler" RepeatColumns="integer" RepeatDirection="Horizontal|Vertical" RepeatLayout="Table|Flow" runat="server" SelectedIndex="integer" ShowFooter="True|False" ShowHeader="True|False" SkinID="string" Style="string" TabIndex="integer" ToolTip="string" UseAccessibleHeader="True|False" Visible="True|False" Width="size" > <AlternatingItemStyle /> <AlternatingItemTemplate> <!-- child controls --> </AlternatingItemTemplate> <EditItemStyle /> <EditItemTemplate> <!-- child controls --> </EditItemTemplate> <FooterStyle /> <FooterTemplate> <!-- child controls --> </FooterTemplate> <HeaderStyle /> <HeaderTemplate> <!-- child controls --> </HeaderTemplate> <ItemStyle /> <ItemTemplate> <!-- child controls --> </ItemTemplate> <SelectedItemStyle /> <SelectedItemTemplate> <!-- child controls --> </SelectedItemTemplate> <SeparatorStyle /> <SeparatorTemplate> <!-- child controls --> </SeparatorTemplate> </asp:DataList>`

A data bound list control that displays items using templates.

- Constructor

  Use this constructor to create and initialize a new instance of the class.

  Initializes a new instance of the class.

  1.0.5000.0
  2.0.0.0
- Property
  System.Web.UI.WebControls.TableItemStyle To be added: an object of type 'TableItemStyle'

  Use the property to provide a custom style for the alternating items in the control. Common style attributes that can be adjusted include foreground color, background color, font, and content alignment within the cell. Providing a different style enhances the appearance of the control.

  Item style properties in the control are inherited from one item style property to another through a hierarchy. Item style properties set lower in the hierarchy are inherited by item style properties higher in the hierarchy. For example, if you specify a red font for the property, all other item style properties in the control will also have a red font. This allows you to provide a common appearance for the control by setting a single item style property. You can override the inherited style settings for an item style property that is higher in the hierarchy by setting its style properties. For example, you can specify a blue font for the property, overriding the red font specified in the property. The following table lists the hierarchy order from highest to lowest.

  Precedence

  Style property

  1

  2

  3

  4

  5

  To specify a custom style for the alternating items, place the <AlternatingItemStyle> tags between the opening and closing tags of the control. You can then list the style attributes within the opening <AlternatingItemStyle> tag.

  Gets the style properties for alternating items in the control.

  1.0.5000.0
  2.0.0.0
  System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)
  System.ComponentModel.NotifyParentProperty(true)
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)
  System.ComponentModel.DefaultValue(null)
- Property
  System.Web.UI.ITemplate a

  Use the property to control the contents of alternating items in the control. The appearance of alternating items is controlled by the property.

  To specify a template for the alternating items, place the <AlternatingItemTemplate> tags between the opening and closing tags of the control. You can then list the contents of the template between the opening and closing <AlternatingItemTemplate> tags.

  This control can be used to display user input, which might include malicious client script. Check any information that is sent from a client for executable script, SQL statements, or other code before displaying it in your application. You can use validation controls to verify user input before displaying the input text in a control. ASP.NET provides an input request validation feature to block script and HTML in user input. For more information, see Securing Standard Controls, How to: Protect Against Script Exploits in a Web Application by Applying HTML Encoding to Strings, and Introduction to Validating User Input in ASP.NET Web Pages.

  Gets or sets the template for alternating items in the .

  1.0.5000.0
  2.0.0.0
  System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)
  System.Web.UI.TemplateContainer(typeof(System.Web.UI.WebControls.DataListItem))
  System.ComponentModel.DefaultValue(null)
  System.ComponentModel.Browsable(false)
- Event
  System.Web.UI.WebControls.DataListCommandEventHandler

  The event is raised when the Cancel button is clicked for an item in the control.

  A typical handler for the event sets the property to -1 (to deselect the item) and then rebinds the data to the control.

  Text is not HTML encoded before it is displayed in the control. This makes it possible to embed script within HTML tags in the text. If the values for the control come from user input, be sure to validate the values to reduce security vulnerabilities.

  For more information about handling events, see How to: Consume Events in a Web Forms Application.

  This control can be used to display user input, which might include malicious client script. Check any information that is sent from a client for executable script, SQL statements, or other code before displaying it in your application. You can use validation controls to verify user input before displaying the input text in a control. ASP.NET provides an input request validation feature to block script and HTML in user input. For more information, see Securing Standard Controls, How to: Protect Against Script Exploits in a Web Application by Applying HTML Encoding to Strings, and Introduction to Validating User Input in ASP.NET Web Pages.

  Occurs when the Cancel button is clicked for an item in the control.

  1.0.5000.0
  2.0.0.0
- Field
  System.String

  Use the field to represent the Cancel command name.

  Represents the Cancel command name. This field is read-only.

  1.0.5000.0
  2.0.0.0
- Method
  System.Void ``

  The method is used primarily by control developers when deriving a custom implementation from the control.

  The method uses the and methods to create controls that represent the header, footer, separator, and data-bound items contained in the data list. You can access the data-bound items for the data list through the collection. You can access all item types, including the header, footer, and separator items, through the collection.

  Override the method to customize how controls are created or added to the control. Override the method to customize templates for a control.

  Creates the control hierarchy that is used to render the data list control, with or without the specified data source.

  true to use the control's data source; false to indicate that the control is being recreated from view state and should not be data-bound. 1.0.5000.0 2.0.0.0
- Method
  System.Web.UI.WebControls.Style

  The method is used primarily by control developers in deriving a custom implementation from the control.

  Creates the default style object that is used internally by the control to implement all style related properties.

  A that contains the default style properties for the control.

  1.0.5000.0
  2.0.0.0
- Method
  System.Web.UI.WebControls.DataListItem `` ``

  The method is used primarily by control developers in creating a custom implementation of the control. The method is functionally equivalent to calling the constructor for a . The and properties are initialized for the new using the specified values, but the item is not inserted into the .

  The method uses the and methods to create controls that represent the header, footer, separator, and data-bound items contained in the data list. You can access the data-bound items for the data list through the collection. You can access all item types, including the header, footer, and separator items, through the collection.

  Creates a object.

  A new created with the specified list-item type.

  The specified location within the to place the created item. A that represents the specified type of the item to create. 1.0.5000.0 2.0.0.0
- Event
  System.Web.UI.WebControls.DataListCommandEventHandler

  The event is raised when the Delete button is clicked for an item in the control.

  A typical handler for the event removes the selected item from the data source and then rebinds the data to the control.

  For more information about handling events, see How to: Consume Events in a Web Forms Application.

  Occurs when the Delete button is clicked for an item in the control.

  1.0.5000.0
  2.0.0.0
- Field
  System.String

  Use the field to represent the Delete command name.

  Represents the Delete command name. This field is read-only.

  1.0.5000.0
  2.0.0.0
- Event
  System.Web.UI.WebControls.DataListCommandEventHandler

  The event is raised when the Edit button is clicked for an item in the control.

  A typical handler for the event sets the property to the selected row and then rebinds the data to the control.

  Text is not HTML encoded before it is displayed in the control. This makes it possible to embed script within HTML tags in the text. If the values for the control come from user input, be sure to validate the values to reduce security vulnerabilities.

  For more information about handling events, see How to: Consume Events in a Web Forms Application.

  This control can be used to display user input, which might include malicious client script. Check any information that is sent from a client for executable script, SQL statements, or other code before displaying it in your application. You can use validation controls to verify user input before displaying the input text in a control. ASP.NET provides an input request validation feature to block script and HTML in user input. For more information, see Securing Standard Controls, How to: Protect Against Script Exploits in a Web Application by Applying HTML Encoding to Strings, and Introduction to Validating User Input in ASP.NET Web Pages.

  Occurs when the Edit button is clicked for an item in the control.

  1.0.5000.0
  2.0.0.0
- Field
  System.String

  Use the field to represent the Edit command name.

  Represents the Edit command name. This field is read-only.

  1.0.5000.0
  2.0.0.0
- Property
  System.Int32 To be added: an object of type 'int'

  Use the property to programmatically specify the item to edit. You can also use this property to determine the index of the item selected for editing.

  The property is zero based.

  To unselect an item, set the property to -1.

  This control can be used to display user input, which might include malicious client script. Check any information that is sent from a client for executable script, SQL statements, or other code before displaying it in your application. You can use validation controls to verify user input before displaying the input text in a control. ASP.NET provides an input request validation feature to block script and HTML in user input. For more information, see Securing Standard Controls, How to: Protect Against Script Exploits in a Web Application by Applying HTML Encoding to Strings, and Introduction to Validating User Input in ASP.NET Web Pages.

  The property is stored in control state.

  Gets or sets the index number of the selected item in the control to edit.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.DefaultValue(-1)
- Property
  System.Web.UI.WebControls.TableItemStyle To be added: an object of type 'TableItemStyle'

  Use the property to provide a custom style for the item selected for editing in the control. Common style attributes that can be adjusted include foreground color, background color, font, and content alignment within the cell. Providing a different style enhances the appearance of the control.

  Item style properties in the control are inherited from one item style property to another through a hierarchy. Item style properties set lower in the hierarchy are inherited by item style properties higher in the hierarchy. For example, if you specify a red font for the property, all other item style properties in the control will also have a red font. This allows you to provide a common appearance for the control by setting a single item style property. You can override the inherited style settings for an item style property that is higher in the hierarchy by setting its style properties. For example, you can specify a blue font for the property, overriding the red font specified in the property. The following table lists the hierarchy order from highest to lowest.

  Precedence

  Style Property

  1

  2

  3

  4

  5

  To specify a custom style for the item selected for editing, place the <EditItemStyle> tags between the opening and closing tags of the control. You can then list the style attributes within the opening <EditItemStyle> tag.

  Gets the style properties for the item selected for editing in the control.

  1.0.5000.0
  2.0.0.0
  System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)
  System.ComponentModel.NotifyParentProperty(true)
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)
  System.ComponentModel.DefaultValue(null)
- Property
  System.Web.UI.ITemplate a

  Use the property to control the contents of the item selected for editing in the control. The appearance of the item selected for editing is controlled by the property.

  To specify a template for the item selected for editing, place the <EditItemTemplate> tags between the opening and closing tags of the control. You can then list the contents of the template between the opening and closing <EditItemTemplate> tags.

  This control can be used to display user input, which might include malicious client script. Check any information that is sent from a client for executable script, SQL statements, or other code before displaying it in your application. You can use validation controls to verify user input before displaying the input text in a control. ASP.NET provides an input request validation feature to block script and HTML in user input. For more information, see Securing Standard Controls, How to: Protect Against Script Exploits in a Web Application by Applying HTML Encoding to Strings, and Introduction to Validating User Input in ASP.NET Web Pages.

  Gets or sets the template for the item selected for editing in the control.

  1.0.5000.0
  2.0.0.0
  System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)
  System.Web.UI.TemplateContainer(typeof(System.Web.UI.WebControls.DataListItem))
  System.ComponentModel.DefaultValue(null)
  System.ComponentModel.Browsable(false)
- Property
  System.Boolean To be added: an object of type 'bool'

  The contents of the control are specified by using templates. Normally, you list controls that you want to display in the templates. You can also place a control in a template and display the rows of the table.

  Use the property to specify whether the rows of a control defined in each template of a control are extracted and displayed. All rows extracted from the templates of the control are displayed in a single table. This allows you to create a single table from other smaller tables and still maintain the features of the control.

  When this property is set to true, you must provide a well-formed control for each template you want to include in the control. Only the rows of the tables will be displayed. All other content in the template will be ignored. You must use a control for this feature to work properly. The control is not compatible with this property.

  When you create a cell for a control in a template, you can use the property of the object to control the number of columns the cell spans. You can also use the property to control the number of rows the cell spans.

  The , , and properties do not affect the appearance of the control when this property is set to true.

  Gets or sets a value that indicates whether the rows of a control, defined in each template of a control, are extracted and displayed.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.DefaultValue(false)
- Property
  System.Web.UI.WebControls.TableItemStyle To be added: an object of type 'TableItemStyle'

  Use this property to provide a custom style for the footer section of the control. Common style attributes that can be adjusted include foreground color, background color, font, and content alignment within the cell. Providing a different style enhances the appearance of the control.

  The property of the control inherits the style settings of the property. For example, if you specify a red font for the property, the property will also have a red font. This allows you to provide a common appearance for the control by setting a single style property. You can override the inherited style settings by setting the property. For example, you can specify a blue font for the property, overriding the red font specified in the property.

  To specify a custom style for the footer section, place the <FooterStyle> tags between the opening and closing tags of the control. You can then list the style attributes within the opening <FooterStyle> tag.

  The property must be set to true for this property to be visible.

  Gets the style properties for the footer section of the control.

  1.0.5000.0
  2.0.0.0
  System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)
  System.ComponentModel.NotifyParentProperty(true)
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)
  System.ComponentModel.DefaultValue(null)
- Property
  System.Web.UI.ITemplate a

  Use the property to control the contents of the footer section. The appearance of the footer section is controlled by the property.

  The property must be set to true for this property to be visible.

  The property of the control inherits the style settings of the property. For example, if you specify a red font for the property, the property will also have a red font. This allows you to provide a common appearance for the control by setting a single style property. You can override the inherited style settings by setting the property. For example, you can specify a blue font for the property, overriding the red font specified in the property.

  To specify a template for the footer section, place the <FooterTemplate> tags between the opening and closing tags of the control. You can then list the contents of the template between the opening and closing <FooterTemplate> tags.

  This control can be used to display user input, which might include malicious client script. Check any information that is sent from a client for executable script, SQL statements, or other code before displaying it in your application. You can use validation controls to verify user input before displaying the input text in a control. ASP.NET provides an input request validation feature to block script and HTML in user input. For more information, see Securing Standard Controls, How to: Protect Against Script Exploits in a Web Application by Applying HTML Encoding to Strings, and Introduction to Validating User Input in ASP.NET Web Pages.

  Gets or sets the template for the footer section of the control.

  1.0.5000.0
  2.0.0.0
  System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)
  System.Web.UI.TemplateContainer(typeof(System.Web.UI.WebControls.DataListItem))
  System.ComponentModel.DefaultValue(null)
  System.ComponentModel.Browsable(false)
- Property
  System.Web.UI.WebControls.GridLines a

  Use the property to specify the grid line style for the control. The following table lists the possible styles.

  Style

  Description

  No grid lines.

  Displays the horizontal grid lines.

  Displays the vertical grid line.

  Displays both the horizontal and vertical grid lines.

  This property only applies if the property is set to RepeatLayout.Table.

  Gets or sets the grid line style for the control when the property is set to RepeatLayout.Table.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.DefaultValue(System.Web.UI.WebControls.GridLines.None)
- Property
  System.Web.UI.WebControls.TableItemStyle To be added: an object of type 'TableItemStyle'

  Use this property to provide a custom style for the heading of the control. Common style attributes that can be adjusted include foreground color, background color, font, and content alignment within the cell. Providing a different style enhances the appearance of the control.

  To specify a custom style for the heading section, place the <HeaderStyle> tags between the opening and closing tags of the control. You can then list the style attributes within the opening <HeaderStyle> tag.

  The property must be set to true for this property to be visible.

  Gets the style properties for the heading section of the control.

  1.0.5000.0
  2.0.0.0
  System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)
  System.ComponentModel.NotifyParentProperty(true)
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)
  System.ComponentModel.DefaultValue(null)
- Property
  System.Web.UI.ITemplate a

  Use the property to control the contents of the heading section. The appearance of the header section is controlled by the property.

  The property must be set to true for this property to be visible.

  To specify a template for the heading section, place the <HeaderTemplate> tags between the opening and closing tags of the control. You can then list the contents of the template between the opening and closing <HeaderTemplate> tags.

  This control can be used to display user input, which might include malicious client script. Check any information that is sent from a client for executable script, SQL statements, or other code before displaying it in your application. You can use validation controls to verify user input before displaying the input text in a control. ASP.NET provides an input request validation feature to block script and HTML in user input. For more information, see Securing Standard Controls, How to: Protect Against Script Exploits in a Web Application by Applying HTML Encoding to Strings, and Introduction to Validating User Input in ASP.NET Web Pages.

  Gets or sets the template for the heading section of the control.

  1.0.5000.0
  2.0.0.0
  System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)
  System.Web.UI.TemplateContainer(typeof(System.Web.UI.WebControls.DataListItem))
  System.ComponentModel.DefaultValue(null)
  System.ComponentModel.Browsable(false)
- Method
  System.Void ``

  The method is used primarily by control developers to extend the control.

  The method uses the and methods to create controls that represent the header, footer, separator, and data-bound items contained in the data list. You can access the data-bound items for the data list through the collection. You can access all item types, including the header, footer, and separator items, through the collection.

  Override the method to customize how controls are created or added to the control. Override the method to customize templates for a control.

  Initializes a object based on the specified templates and styles for the list-item type.

  The to initialize. 1.0.5000.0 2.0.0.0
- Event
  System.Web.UI.WebControls.DataListCommandEventHandler

  The event is raised when any button is clicked in the control and is commonly used when you have a button control with a custom CommandName value.

  For more information about handling events, see How to: Consume Events in a Web Forms Application.

  Occurs when any button is clicked in the control.

  1.0.5000.0
  2.0.0.0
- Event
  System.Web.UI.WebControls.DataListItemEventHandler

  The event is raised when an item in the control is created, both during round-trips and at the time data is bound to the control.

  The event is commonly used to control the content and appearance of a row in the control.

  For more information about handling events, see How to: Consume Events in a Web Forms Application.

  Occurs on the server when an item in the control is created.

  1.0.5000.0
  2.0.0.0
- Event
  System.Web.UI.WebControls.DataListItemEventHandler

  The event is raised after an item is data bound to the control. This event provides you with the last opportunity to access the data item before it is displayed on the client. After this event is raised, the data item is no longer available.

  For more information about handling events, see How to: Consume Events in a Web Forms Application.

  Occurs when an item is data bound to the control.

  1.0.5000.0
  2.0.0.0
- Property
  System.Web.UI.WebControls.DataListItemCollection To be added: an object of type 'DataListItemCollection'

  Use the collection to programmatically control the items in the control. The collection does not provide any methods to add or remove items to the collection. However, you can control the contents of an item by providing a handler for the event.

  Only items bound to the data source are contained in the collection. The header, footer, and separator are not included in the collection.

  Gets a collection of objects representing the individual items within the control.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
  System.ComponentModel.Browsable(false)
- Property
  System.Web.UI.WebControls.TableItemStyle To be added: an object of type 'TableItemStyle'

  Use this property to provide a custom style for the items of the control. Common style attributes that can be adjusted include foreground color, background color, font, and content alignment within the cell. Providing a different style enhances the appearance of the control.

  Item style properties in the control are inherited from one item style property to another through a hierarchy. Item style properties set lower in the hierarchy are inherited by item style properties higher in the hierarchy. For example, if you specify a red font for the property, all other item style properties in the control will also have a red font. This allows you to provide a common appearance for the control by setting a single item style property. You can override the inherited style settings for an item style property that is higher in the hierarchy by setting its style properties. For example, you can specify a blue font for the property, overriding the red font specified in the property. The following table lists the hierarchy order from highest to lowest.

  Precedence

  Style Property

  1

  2

  3

  4

  5

  To specify a custom style for the items of the control, place the <ItemStyle> tags between the opening and closing tags of the control. You can then list the style attributes within the opening <ItemStyle> tag.

  You can also use the property to provide a different appearance for the alternating items in the control.

  Gets the style properties for the items in the control.

  1.0.5000.0
  2.0.0.0
  System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)
  System.ComponentModel.NotifyParentProperty(true)
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)
  System.ComponentModel.DefaultValue(null)
- Property
  System.Web.UI.ITemplate a

  Use the property to control the contents of the items in the control. The appearance of the items in the control is controlled by the property.

  To specify a template for the items of the control, place the <ItemTemplate> tags between the opening and closing tags of the control. You can then list the contents of the template between the opening and closing <ItemTemplate> tags.

  You can optionally use the property to provide a different appearance for the alternating items in the control.

  This control can be used to display user input, which might include malicious client script. Check any information that is sent from a client for executable script, SQL statements, or other code before displaying it in your application. You can use validation controls to verify user input before displaying the input text in a control. ASP.NET provides an input request validation feature to block script and HTML in user input. For more information, see Securing Standard Controls, How to: Protect Against Script Exploits in a Web Application by Applying HTML Encoding to Strings, and Introduction to Validating User Input in ASP.NET Web Pages.

  Gets or sets the template for the items in the control.

  1.0.5000.0
  2.0.0.0
  System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)
  System.Web.UI.TemplateContainer(typeof(System.Web.UI.WebControls.DataListItem))
  System.ComponentModel.DefaultValue(null)
  System.ComponentModel.Browsable(false)
- Method
  System.Void ``

  This method is used primarily by the .NET Framework infrastructure and is not intended to be used directly from your code. However, control developers can override this method to specify how a custom server control restores its view state. For more information, see ASP.NET State Management Overview.

  The method restores view-state information for the control from a previous page request that was saved by the method.

  Loads the previously saved view state of the control.

  An object that represents the state of the . 1.0.5000.0 2.0.0.0
- Method
  System.Boolean `` `` To be added a To be added The source of the event. The event data. 1.0.5000.0 2.0.0.0
- Method
  System.Void ``

  Use the method to provide a custom handler for the event.

  The event is raised when the Cancel button is clicked for an item in the control.

  A typical handler for the event sets the property to -1 (to deselect the item) and then rebinds the data to the control.

  This control can be used to display user input, which might include malicious client script. Check any information that is sent from a client for executable script, SQL statements, or other code before displaying it in your application. You can use validation controls to verify user input before displaying the input text in a control. ASP.NET provides an input request validation feature to block script and HTML in user input. For more information, see Securing Standard Controls, How to: Protect Against Script Exploits in a Web Application by Applying HTML Encoding to Strings, and Introduction to Validating User Input in ASP.NET Web Pages.

  Raising an event invokes the event handler through a delegate. For more information, see How to: Consume Events in a Web Forms Application.

  The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

  Raises the event. This allows you to provide a custom handler for the event.

  A that contains event data. 1.0.5000.0 2.0.0.0
- Method
  System.Void ``

  Use the method to provide a custom handler for the event.

  The event is raised when the Delete button is clicked for an item in the control.

  A typical handler for the event removes the selected item from the data source and then rebinds the data to the control.

  Raising an event invokes the event handler through a delegate. For more information, see How to: Consume Events in a Web Forms Application.

  The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

  Raises the event. This allows you to provide a custom handler for the event.

  A that contains event data. 1.0.5000.0 2.0.0.0
- Method
  System.Void ``

  Use the method to provide a custom handler for the event.

  The event is raised when the Edit button is clicked for an item in the control.

  A typical handler for the event sets the property to the selected row and then rebinds the data to the control.

  This control can be used to display user input, which might include malicious client script. Check any information that is sent from a client for executable script, SQL statements, or other code before displaying it in your application. You can use validation controls to verify user input before displaying the input text in a control. ASP.NET provides an input request validation feature to block script and HTML in user input. For more information, see Securing Standard Controls, How to: Protect Against Script Exploits in a Web Application by Applying HTML Encoding to Strings, and Introduction to Validating User Input in ASP.NET Web Pages.

  Raising an event invokes the event handler through a delegate. For more information, see How to: Consume Events in a Web Forms Application.

  The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

  Raises the event. This allows you to provide a custom handler for the event.

  A that contains event data. 1.0.5000.0 2.0.0.0
- Method
  2.0.0.0
  System.Void ``

  The method notifies the control to perform any initialization steps that are required to create and set up an instance.

  Raises the event for the control.

  An that contains the event data.
- Method
  System.Void ``

  Use the method to provide a custom handler for the event.

  The event is raised when any button is clicked in the control and is commonly used when you have a button control with a custom CommandName value, such as Add, in the control.

  Raising an event invokes the event handler through a delegate. For more information, see How to: Consume Events in a Web Forms Application.

  The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

  Raises the event. This allows you to provide a custom handler for the event.

  A that contains event data. 1.0.5000.0 2.0.0.0
- Method
  System.Void ``

  Use the method to provide a custom handler for the event.

  The event is raised when an item in the control is created, both during round-trips and at the time data is bound to the control.

  The event is commonly used to control the content and appearance of a row in the control.

  Raising an event invokes the event handler through a delegate. For more information, see How to: Consume Events in a Web Forms Application.

  The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

  Raises the event. This allows you to provide a custom handler for the event.

  A that contains event data. 1.0.5000.0 2.0.0.0
- Method
  System.Void ``

  Use the method to provide a custom handler for the event.

  The event is raised after an item is data bound to the control. This event provides you with the last opportunity to access the data item before it is displayed on the client. After this event is raised, the data item is no longer available.

  Raising an event invokes the event handler through a delegate. For more information, see How to: Consume Events in a Web Forms Application.

  The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

  Raises the event. This allows you to provide a custom handler for the event.

  A that contains event data. 1.0.5000.0 2.0.0.0
- Method
  System.Void ``

  Use the method to provide a custom handler for the event.

  The event is raised when the Update button for an item is clicked.

  A typical handler for the event updates the data, sets the property to -1 (to deselect the item), and then rebinds the data to the control.

  This control can be used to display user input, which might include malicious client script. Check any information that is sent from a client for executable script, SQL statements, or other code before displaying it in your application. You can use validation controls to verify user input before displaying the input text in a control. ASP.NET provides an input request validation feature to block script and HTML in user input. For more information, see Securing Standard Controls, How to: Protect Against Script Exploits in a Web Application by Applying HTML Encoding to Strings, and Introduction to Validating User Input in ASP.NET Web Pages.

  Raising an event invokes the event handler through a delegate. For more information, see How to: Consume Events in a Web Forms Application.

  The method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

  Raises the event. This allows you to provide a custom handler for the event.

  A that contains event data. 1.0.5000.0 2.0.0.0
- Method
  System.Void

  The method is used primarily by control developers when deriving a custom control from the control.

  The prepares the control hierarchy and sets styles for contained controls before the child controls are rendered.

  Prepares the control hierarchy for rendering in the control.

  1.0.5000.0
  2.0.0.0
- Method
  System.Void ``

  The method is used primarily by control developers, when deriving a custom control from the control.

  The method renders the inner content of the control, including the contained controls.

  Renders the list items in the control.

  A that represents the output stream to render HTML content on the client. 1.0.5000.0 2.0.0.0
- Property
  System.Int32 To be added: an object of type 'int'

  Use this property to specify the number of columns that display items in the control. For example, if you set this property to 5, the control displays its items in five columns.

  If this property is set to 0, the control displays its items in a single row or column, based on the value of the property. If the property is set to RepeatDirection.Horizontal, the items are displayed in a single row. If the property is set to RepeatDirection.Vertical, the items are displayed in a single column.

  Gets or sets the number of columns to display in the control.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.DefaultValue(0)
- Property
  System.Web.UI.WebControls.RepeatDirection To be added: an object of type 'RepeatDirection'

  Use the property to specify the display direction of the control.

  The number of columns displayed is always determined by the property.

  If this property is set to RepeatDirection.Vertical, the items in the list are displayed in columns loaded from top to bottom, then left to right, until all items are rendered. For example, if the property is set to 3, the items in the control are displayed in three columns, as in the following table.

  1

  4

  7

  2

  5

  8

  3

  6

  9

  If this property is set to RepeatDirection.Horizontal, the items in the list are displayed in rows loaded from left to right, then top to bottom, until all items are rendered. For example, if the property is set to 3, the items of the control are displayed in rows of three items each, as in the following table.

  1

  2

  3

  4

  5

  6

  7

  8

  9

  Gets or sets whether the control displays vertically or horizontally.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.DefaultValue(System.Web.UI.WebControls.RepeatDirection.Vertical)
- Property
  System.Web.UI.WebControls.RepeatLayout To be added: an object of type 'RepeatLayout'

  Use the property to specify whether the items in the control are displayed in a table. The only values that are supported by the control are and .

  If this property is set to RepeatLayout.Table, the items in the list are displayed in a table. If this property is set to RepeatLayout.Flow, the items in the list are displayed without a table structure.

  When the control is displayed in a table, you can use the property to specify a grid line style.

  Gets or sets whether the control is displayed in a table or flow layout.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.DefaultValue(System.Web.UI.WebControls.RepeatLayout.Table)
- Method
  System.Object

  The method is used primarily by control developers.

  View state is the accumulation of the values of a server control's properties. These values are automatically placed in the server control's property, which is an instance of the class. The property's value is then persisted to a string object after the save-state stage of the server control's life cycle. For more information, see ASP.NET Page Life Cycle Overview.

  When view state is saved, this string object is returned to the client as a variable that is stored in a hidden HTML input element. When you author custom server controls, you can improve efficiency by overriding the method and modifying the property for your server control. For more information, see Developing Custom ASP.NET Server Controls and ASP.NET State Management Overview.

  Saves the changes to the control view state since the time the page was posted back to the server.

  The object that contains the changes to the view state.

  1.0.5000.0
  2.0.0.0
- Field
  System.String

  Use the field to represent the Select command name.

  Represents the Select command name. This field is read-only.

  1.0.5000.0
  2.0.0.0
- Property
  System.Int32 To be added: an object of type 'int'

  Use the property to programmatically specify the selected item in the control. You can also use this property to determine the index of the selected item.

  The property is zero based.

  To deselect an item, set the property to -1.

  The property is stored in control state.

  Gets or sets the index of the selected item in the control.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.DefaultValue(-1)
  System.ComponentModel.Bindable(true)
- Property
  System.Web.UI.WebControls.DataListItem To be added: an object of type 'DataListItem'

  Use the property to get a object that represents the selected item in the control. This object can then be used to access the properties of the selected item.

  Gets the selected item in the control.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
  System.ComponentModel.Browsable(false)
- Property
  System.Web.UI.WebControls.TableItemStyle To be added: an object of type 'TableItemStyle'

  Use this property to provide a custom style for the selected item in the control. Common style attributes that can be adjusted include foreground color, background color, font, and content alignment within the cell. Providing a different style enhances the appearance of the control.

  Item style properties in the control are inherited from one item style property to another through a hierarchy. Item style properties set lower in the hierarchy are inherited by item style properties higher in the hierarchy. For example, if you specify a red font for the property, all other item style properties in the control will also have a red font. This allows you to provide a common appearance for the control by setting a single item style property. You can override the inherited style settings for an item style property that is higher in the hierarchy by setting its style properties. For example, you can specify a blue font for the property, overriding the red font specified in the property. The following table lists the hierarchy order from highest to lowest.

  Precedence

  Style Property

  1

  2

  3

  4

  5

  To specify a custom style for the selected item, place the <SelectedItemStyle> tags between the opening and closing tags of the control. You can then list the style attributes within the opening <SelectedItemStyle> tag.

  Gets the style properties for the selected item in the control.

  1.0.5000.0
  2.0.0.0
  System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)
  System.ComponentModel.NotifyParentProperty(true)
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)
  System.ComponentModel.DefaultValue(null)
- Property
  System.Web.UI.ITemplate a

  Use the property to control the contents of the selected item. The appearance of the selected item is controlled by the property.

  To specify a template for the selected item, place the <SelectedItemTemplate> tags between the opening and closing tags of the control. You can then list the contents of the template between the opening and closing <SelectedItemTemplate> tags.

  This control can be used to display user input, which might include malicious client script. Check any information that is sent from a client for executable script, SQL statements, or other code before displaying it in your application. You can use validation controls to verify user input before displaying the input text in a control. ASP.NET provides an input request validation feature to block script and HTML in user input. For more information, see Securing Standard Controls, How to: Protect Against Script Exploits in a Web Application by Applying HTML Encoding to Strings, and Introduction to Validating User Input in ASP.NET Web Pages.

  Gets or sets the template for the selected item in the control.

  1.0.5000.0
  2.0.0.0
  System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)
  System.Web.UI.TemplateContainer(typeof(System.Web.UI.WebControls.DataListItem))
  System.ComponentModel.DefaultValue(null)
  System.ComponentModel.Browsable(false)
- Property
  2.0.0.0
  System.ComponentModel.Browsable(false)
  System.Object To be added. To be added.

  Gets the value of the key field for the selected data list item.

- Property
  System.Web.UI.WebControls.TableItemStyle To be added: an object of type 'TableItemStyle'

  Use the property to provide a custom style for the separator between each item in the control. The separator allows you to place an element with custom content between each item in the control. Common style attributes that can be adjusted include foreground color, background color, font, and content alignment within the cell. Providing a different style enhances the appearance of the control.

  To specify a custom style for the separator, place the <SeparatorStyle> tags between the opening and closing tags of the control. You can then list the style attributes within the opening <SeparatorStyle> tag.

  Gets the style properties of the separator between each item in the control.

  1.0.5000.0
  2.0.0.0
  System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)
  System.ComponentModel.NotifyParentProperty(true)
  System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)
  System.ComponentModel.DefaultValue(null)
- Property
  System.Web.UI.ITemplate a

  Use the property to control the contents of the separator between the items of the control. The separator allows you to place an element with custom content between each item in the control. The appearance of the separator between the items of the control is controlled by the property.

  To specify a template for the separator, place the <SeparatorTemplate> tags between the opening and closing tags of the control. You can then list the contents of the template between the opening and closing <SeparatorTemplate> tags.

  This control can be used to display user input, which might include malicious client script. Check any information that is sent from a client for executable script, SQL statements, or other code before displaying it in your application. You can use validation controls to verify user input before displaying the input text in a control. ASP.NET provides an input request validation feature to block script and HTML in user input. For more information, see Securing Standard Controls, How to: Protect Against Script Exploits in a Web Application by Applying HTML Encoding to Strings, and Introduction to Validating User Input in ASP.NET Web Pages.

  Gets or sets the template for the separator between the items of the control.

  1.0.5000.0
  2.0.0.0
  System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)
  System.Web.UI.TemplateContainer(typeof(System.Web.UI.WebControls.DataListItem))
  System.ComponentModel.DefaultValue(null)
  System.ComponentModel.Browsable(false)
- Property
  System.Boolean To be added: an object of type 'bool'

  Use the property to specify whether the footer section is displayed in the control.

  You can control the appearance of the footer section by setting the property. The contents of the footer section are controlled by the property.

  Gets or sets a value indicating whether the footer section is displayed in the control.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.DefaultValue(true)
- Property
  System.Boolean To be added: an object of type 'bool'

  Use the property to specify whether the header section is displayed in the control.

  You can control appearance of the header section by setting the property. The contents of the header section are controlled by the property.

  Gets or sets a value indicating whether the header section is displayed in the control.

  1.0.5000.0
  2.0.0.0
  System.ComponentModel.DefaultValue(true)
- Method
  1.0.5000.0
  2.0.0.0
  System.Web.UI.WebControls.Style `` ``

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.

  For a description of this member, see .

  A that represents the style of the specified item type at the specified index in the list control.

  One of the enumeration values. The index of the item in the list control.
- Property
  1.0.5000.0
  2.0.0.0
  System.Boolean To be added.

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.

  For a description of this member, see .

- Property
  1.0.5000.0
  2.0.0.0
  System.Boolean To be added.

  This member is an explicit interface member implementation. It can be used only when the instance is cast an interface.

  For a description of this member, see .

- Property
  1.0.5000.0
  2.0.0.0
  System.Boolean To be added.

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.

  For a description of this member, see .

- Method
  1.0.5000.0
  2.0.0.0
  System.Void `` `` `` ``

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.

  For a description of this member, see .

  The type of the item. The index of the item. Information that is used to render the item. The object to use to render the item.
- Property
  1.0.5000.0
  2.0.0.0
  System.Int32 To be added.

  This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface.

  For a description of this member, see .

- Property
  1.0.5000.0
  2.0.0.0
  System.Web.UI.HtmlTextWriterTag To be added.

  Use the property to determine the value that is associated with a control. The property is used primarily by control developers.

  Gets the HTML tag that is used to render the control.

- Method
  System.Void

  The method is overridden to mark the starting point at which to begin tracking and saving changes to the control as part of the control's view state.

  Tracks view-state changes to the control so they can be stored in the control's property.

  1.0.5000.0
  2.0.0.0
- Event
  System.Web.UI.WebControls.DataListCommandEventHandler

  The event is raised when the Update button for an item is clicked.

  A typical handler for the event updates the data, sets the property to -1 (to deselect the item), and then rebinds the data to the control.

  This control can be used to display user input, which might include malicious client script. Check any information that is sent from a client for executable script, SQL statements, or other code before displaying it in your application. You can use validation controls to verify user input before displaying the input text in a control. ASP.NET provides an input request validation feature to block script and HTML in user input. For more information, see Securing Standard Controls, How to: Protect Against Script Exploits in a Web Application by Applying HTML Encoding to Strings, and Introduction to Validating User Input in ASP.NET Web Pages.

  For more information about handling events, see How to: Consume Events in a Web Forms Application.

  Occurs when the Update button is clicked for an item in the control.

  1.0.5000.0
  2.0.0.0
- Field
  System.String

  Use the field to represent the Update command name.

  Represents the Update command name. This field is read-only.

  1.0.5000.0
  2.0.0.0