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.HtmlControls.HtmlContainerControl
System.Web.UI.IPostBackDataHandler
System.Web.UI.SupportsEventValidation
System.Web.UI.ControlBuilder(typeof(System.Web.UI.HtmlControls.HtmlSelectBuilder))
System.Web.UI.ValidationProperty("Value")
System.ComponentModel.DefaultEvent("ServerChange")
Use the control to create a selection box. Specify item listings in the control by placing HTML <option> elements between the opening and closing <select> tags. Each item is represented by a object. To specify the text that is displayed for each item in the control, you can set the property of the item, or simply place text between the opening and closing <option> tags. By setting the property of the item, you can associate a value with the item that is different from the text. To select an item from the list by default, set the property of the item to true.
You can control the appearance and behavior of the control by setting the and properties. The property specifies the height (in rows) of the control. The property specifies whether more than one item can be concurrently selected in the control.
By default, the control is displayed as a drop-down list box. If you allow multiple selections (by setting the property to true) or specify a height greater than one row (by setting the property to a value greater than 1), the control is displayed as a list box.
To determine the selected item in a single-selection control, use the property to get the index of the selected item. You can then use this value to retrieve the item from the collection.
To determine the selected items from an control that allows multiple selections, iterate through the collection and test the property of each item.
The class provides two properties to support data binding. To bind data to any object that implements the interface (such as , , and ), or the interface, use the property to specify the data source to bind to. When you set the property, you must manually write the code to perform the data binding. To automatically bind an control to a data source represented by a data source control, use the property and set its value to the property of the data source control to use. When you set the property, the control automatically binds to the specified data source control. Therefore, you do not need to explicitly call the method.
You can also specify which fields in the data source bind to the and properties of an item in the control by setting the and properties, respectively. If the data source contains multiple sources of data, use the property to specify the specific source to bind to the control. For example, if you have a object with multiple tables, you must specify which table to bind to the control with the property.
For a list of initial property values for an instance of , see the constructor.
Allows programmatic access to the HTML <select> element on the server.
Constructor
Use this constructor to create and initialize a new instance of the class.
The following table shows the initial property value for an instance of .
-
Property
Initial Value
-
The "select" literal string.
Initializes a new instance of the class.
1.0.5000.0
2.0.0.0
Method
System.Void
The method is used by ASP.NET to add parsed child controls to the control.
Adds a parsed child control to the control.
The parsed child control to add.
1.0.5000.0
2.0.0.0
Method
System.Void
The method iterates through the collection represented by the control's property and sets the property of each object to false.
Clears the list selection of the control and sets the property of all items to false.
1.0.5000.0
2.0.0.0
Method
System.Web.UI.ControlCollection
The control does not allow child controls.
Creates an object for the control.
A to contain the current server control's child server controls.
1.0.5000.0
2.0.0.0
Property
System.String
To be added: an object of type 'string'
If the property contains multiple sets of data, use the property to specify which set of data to bind to the control. For example, if you have a object with multiple tables, use this property to indicate which table to bind to the control.
After you have specified the data source to bind to the control, you can then specify which fields from the data source to bind to the and properties of each item in the control by setting the and properties, respectively.
Gets or sets the set of data to bind to the control from a property with multiple sets of data.
1.0.5000.0
2.0.0.0
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
System.ComponentModel.DefaultValue("")
Property
System.Object
To be added: an object of type 'object'
Use the property to specify the data source to bind to the control. A data source must be a collection that implements either the interface (such as , , or ) or the interface. When you set the property, you must manually write the code to perform data binding.
If the data source contains multiple sets of data, such as a object with multiple tables, use the property to specify which data set to bind to the control.
You can specify which fields from the data source to bind to the and properties of each item in the control by setting the and properties, respectively.
Alternately, you can use the property to automatically bind to a data source represented by a data source control. When you set the property, the data listing control automatically binds to the specified data source control. You do not need to write code that explicitly calls the method.
If values are specified for both the property and the property, ASP.NET is not able to resolve the data source and a exception is thrown.
Gets or sets the source of information to bind to the control.
1.0.5000.0
2.0.0.0
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
System.ComponentModel.DefaultValue(null)
Property
2.0.0.0
System.ComponentModel.DefaultValue("")
System.String
To be added.
Use the property to set or access the property of the data source control that the control should use to retrieve its data source. The data source control referenced by the property can be any control that implements the interface. The data source control must exist either in the same naming container as the control that references it or in a parent control of the control. When you specify a value for this property, the control automatically binds to the specified data source control. You do not need to write code that explicitly calls the method.
Alternately, you can use the property to specify the source of values to bind to an control. The data source must be a collection that implements the interface (such as , , or ) or the interface. When you set the property, you must manually write the code to perform data binding.
If values are specified for both the property and the property, ASP.NET is not able to resolve the data source and a exception is thrown.
Gets or sets the property of the data source control that the control should use to retrieve its data source.
Property
System.String
To be added: an object of type 'string'
Use the property to specify which field from the data source to bind to the property of each item in the control. This property is commonly used to provide a value for the property that differs from the value of the property.
The class provides two properties for specifying the data source to bind to. The property allows you to bind an control to any collection that implements the or interfaces (such as , , or ). When you use the property to specify the data source, you must explicitly call the method to bind the control and its property to the data source.
The property allows you to bind an control to a data source control that represents a data source. When you use the property to specify the data source, the control and its property automatically bind to the specified data source control. Therefore, you do not need to explicitly call the method.
Gets or sets the field from the data source to bind to the property of each item in the control.
1.0.5000.0
2.0.0.0
System.ComponentModel.DefaultValue("")
Property
System.String
To be added: an object of type 'string'
Use the property to specify which field from the data source to bind to the property of each item in the control. This property is commonly used to provide a value for the property that differs from the value of the property.
The class provides two properties for specifying the data source to bind to. The property allows you to bind an control to any collection that implements the or interfaces (such as , , or ). When you use the property to specify the data source, you must explicitly call the method to bind the control and its property to the data source.
The property allows you to bind an control to a data source control that represents a data source. When you use the property to specify the data source, the control and its property automatically bind to the data source control. Therefore, you do not need to explicitly call the method.
Gets or sets the field from the data source to bind to the property of each item in the control.
1.0.5000.0
2.0.0.0
System.ComponentModel.DefaultValue("")
Method
2.0.0.0
System.Void
When you specify a value for the property, ASP.NET automatically binds the data listing control to the specified data source control. When ASP.NET performs data binding for the control, it calls the method first to verify that the control has not already been data-bound and that a valid data source control that implements the interface is specified for its property. The method then calls the method to ensure that the control is data-bound immediately after the call to this method.
Verifies that the control requires data binding and that a valid data source control is specified before calling the method.
Method
2.0.0.0
System.Collections.IEnumerable
The method returns an object independent of whether the data source was specified by the property or the property.
Gets an object that represents the data source that is bound to the control.
An object. If no data source is specified, a default value of null is returned.
Property
System.String
a
Do not read from or assign a value to this property. Otherwise, a exception is thrown. This property is inherited from the class and is not applicable to the class.
Gets or sets the content between the opening and closing tags of the control without automatically converting special characters to their equivalent HTML entities. This property is not supported for this control.
1.0.5000.0
2.0.0.0
Property
System.String
a
Do not read from or assign a value to this property. Otherwise, a exception is thrown. This property is inherited from the class and is not applicable to the class.
Gets or sets the content between the opening and closing tags of the control with automatic conversion of special characters to their equivalent HTML entities. This property is not supported for this control.
1.0.5000.0
2.0.0.0
Property
2.0.0.0
System.Boolean
To be added.
If the length of the string representing the property string is greater than zero, then returns true.
Gets a value indicating whether a property is defined for the control.
Property
System.Web.UI.WebControls.ListItemCollection
a
Use the collection to manage the items listed in the control. You can programmatically add items to, remove items from, and insert items into the collection.
The collection is commonly used to iterate through the items in the control. For example, when multiple items are selected, you can iterate through the collection to determine which items are selected.
Gets a collection that contains the items listed in an control.
1.0.5000.0
2.0.0.0
System.ComponentModel.Browsable(false)
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
Method
2.0.0.0
System.Boolean
The method checks whether the postback data of the control is different from its previous value, and if so, returns true. If the control's property is false, indicating a single-selection control, then the method checks the property. If the control's property is true, indicating a multiple-selection control, then the method checks the property.
The method is used primarily by control developers extending the functionality of the control.
Processes the postback data for the control.
true if the control's state has changed as a result of a postback; otherwise, false.
The key identifier for the control.
The collection of all incoming name values.
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 control's view state is stored as a object. The field of the object holds the control's base view state. The field of the object holds the collection represented by the property. The field of the object holds the selected indices represented by the property. The method calls the base class's method to restore the control's base view state.
The method is used primarily by control developers extending the functionality of the control.
Restores the control's view state information from a previous page request that was saved by the method.
An that represents the control state to be restored.
1.0.5000.0
2.0.0.0
Property
System.Boolean
To be added: an object of type 'bool'
Use the property to specify whether multiple items can be concurrently selected in the control.
By default, the control is displayed as a drop-down list box. If you allow multiple selections (by setting the property to true) or specify a height greater than one row (by setting the property to a value greater than 1), the control is displayed as a list box.
To determine the selected items in an control that allows multiple simultaneous selections, iterate through the collection and test the property of each item.
The multiple attribute is rendered in the control only if this property is set to true.
Gets or sets a value indicating whether multiple items can be selected concurrently in the control.
1.0.5000.0
2.0.0.0
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
System.ComponentModel.DefaultValue("")
Property
System.String
To be added: an object of type 'string'
Use the property to determine the unique identifier name for an control. In this implementation, the get accessor returns the value of the property. However, the set accessor does not assign a value to this property.
The set accessor does not assign a value to this property because the property must have the same value as the property for the control to work properly.
Gets or sets the unique identifier name associated with the control.
1.0.5000.0
2.0.0.0
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
System.ComponentModel.DefaultValue("")
Method
System.Void
The event is raised when data is bound to the control. This method notifies the control to perform any data-binding logic that is associated with it. Specifically, the method creates the collection from the data source specified in either the property or the property.
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
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 of an control.
A that contains the event data.
1.0.5000.0
2.0.0.0
Method
2.0.0.0
System.Void
The method sets the property to true if the , , or property has changed.
Invoked when the , , or property is changed.
Method
2.0.0.0
System.Void
The method sets the property to true.
Invoked when the , , or property is changed.
The source of the event.
An that contains the event data.
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. If the property is false and the property is true, then the property is set to true.
Raises the event for the control.
A that contains the event data.
Method
2.0.0.0
System.Void
The method notifies the control that it should perform actions common to each HTTP request for the page it is associated with. The method connects the control to the appropriate data source specified in either the property or the property. If the property is to specify the data source control that the control should use to retrieve its data source, then the method is set as the event handler.
Raises the event for the control.
A that contains the event data.
Method
2.0.0.0
System.Void
To be added.
To be added.
To be added.
To be added.
Method
System.Void
If the property is greater than 1, then the method registers the control with the control as one that requires postback processing.
Raises the event for the control.
An that contains the event data.
1.0.5000.0
2.0.0.0
Method
System.Void
The event is raised when the selected items in the control change between posts to the server.
This event is raised only when the user initiates a post to the server, such as by clicking a Submit button. This event does not cause a post to the server to occur.
The control must have view state enabled for the event to work correctly.
You can use this event to perform data validation on the control when the user changes the selection in the control.
Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.
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 of the control. This allows you to provide a custom handler for the event.
A that contains the event data.
1.0.5000.0
2.0.0.0
Method
2.0.0.0
System.Void
The method is used primarily by control developers extending the functionality of the control.
Calls the method to signal the control that the state of the control has changed.
Method
System.Void
a
The method renders the attribute of the control directly to ensure that it has the same value as the property. After rendering the attribute, the method calls the base class's method.
The method is used primarily by control developers extending the functionality of the control.
Renders the control's attributes to the specified object.
1.0.5000.0
2.0.0.0
Method
System.Void
a
The method overrides the base class's method without calling the base method. Each of the <option> elements between the opening and closing <select> tags is rendered with a attribute, a attribute if the item is selected, and its associated text.
If multiple items were selected but the property is set to false, then an exception is thrown.
Renders the control's child controls to the specified object.
1.0.5000.0
2.0.0.0
Property
2.0.0.0
System.Boolean
To be added.
The control uses the property to determine whether the control needs to call the method to bind to its specified data source.
Each time the set accessor is called on either the , , or property to change the data source after the method has already been called, ASP.NET automatically sets the value of the property to true. The value of the property is also set to true when the method is invoked.
ASP.NET automatically sets the value of the property to false immediately after the method has been called.
Gets or sets a value indicating whether the control needs to bind to its specified data source.
Method
System.Object
The control's view state is stored as a object. The field of the object holds the control's base view state. The field of the object holds the collection represented by the property. The field of the object holds the selected indices represented by the property. The method calls the base class's method to save the control's base view state.
The method is used primarily by control developers extending the functionality of the control.
Saves any control view state changes that have occurred since the page was posted back to the server.
The that contains the changes to the view state. If no view state is associated with the object, this method returns a null reference (Nothing in Visual Basic).
1.0.5000.0
2.0.0.0
Method
System.Void
The method selects multiple items of the collection.
Selects multiple items of the control's collection.
An of type that contains the items to select.
1.0.5000.0
2.0.0.0
Property
System.Int32
To be added: an object of type 'int'
The property is commonly used to determine the index of the selected item in a single-selection control. This index can then be used to retrieve the item from the collection.
If the property is set to true, indicating that multiple items can be concurrently selected, the property contains the index of the first selected item. To determine the selected items from an control that allows multiple simultaneous selections, iterate through the collection and test the property of each item.
It is possible to have no item selected. If no item is selected, the property contains a value of -1. This commonly occurs when the page first loads and an item is not selected by default. Provide code to test this value before referencing the item in the collection. Otherwise, an exception is thrown if the index is out of the range of the collection.
By default, the control is displayed as a drop-down list box. If you allow multiple selections (by setting the property to true) or specify a height greater than one row (by setting the property to a value greater than 1), the control is displayed as a list box. If a drop-down list box is displayed, an item is always selected. If a list box is displayed, you can programmatically clear the selection from all items by setting the property to -1.
Gets or sets the ordinal index of the selected item in an control.
1.0.5000.0
2.0.0.0
System.ComponentModel.Browsable(false)
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
Property
System.Int32[]
To be added: an object of type 'int []'
The property is used by the class to return a collection that contains the zero-based indexes of all currently selected items in the control.
Control developers extending the functionality of the class can override the property to provide a custom algorithm for returning currently selected items.
Gets a collection that contains the zero-based indexes of all currently selected items in the control.
1.0.5000.0
2.0.0.0
Event
System.EventHandler
The event is raised when the selected items in the control change between posts to the server.
The control must have view state enabled for the event to work correctly.
For more information about handling events, see Consuming Events.
Occurs when the selected items in the control change between posts to the server.
1.0.5000.0
2.0.0.0
Property
System.Int32
To be added: an object of type 'int'
Use the property to specify the height (in rows) of the control. If you specify a size that is smaller than the number of items in the control, scroll bars are displayed to allow you to move up and down the list.
By default, the control is displayed as a drop-down list box. If you allow multiple selections (by setting the property to true) or specify a height greater than one row (by setting the property to a value greater than 1), the control is displayed as a list box.
Gets or sets the height (in rows) of the control.
1.0.5000.0
2.0.0.0
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)
Method
1.0.5000.0
2.0.0.0
System.Boolean
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 .
true if the control's state has changed as a result of a postback; otherwise, false.
The key identifier for the control.
The collection of all incoming name values.
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 .
Method
System.Void
The method persists items in the collection of the control to view state.
Tracks view state changes to the control so the changes can be stored in the control's object. This object is accessible through the property.
1.0.5000.0
2.0.0.0
Property
System.String
To be added: an object of type 'string'
The property is commonly used to get the value of the item referenced by the property.
If no item is selected in the control, is returned.
If you set this property to a value, the property is updated with the index of the first item in the list that contains that value. If no matching value is found, the property is left unchanged.
Gets the value of the selected item in the control or sets the property of the control to the index of the first item in the list with the specified value.
1.0.5000.0
2.0.0.0
System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Hidden)