ListControl::AutoPostBack Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets or sets a value indicating whether a postback to the server automatically occurs when the user changes the list selection.

Namespace:   System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

public:
[ThemeableAttribute(false)]
property bool AutoPostBack {
	virtual bool get();
	virtual void set(bool value);
}

Property Value

Type: System::Boolean

true if a postback to the server automatically occurs whenever the user changes the selection of the list; otherwise, false. The default is false.

Set this property to true if the server needs to capture the selection as soon as it is made. For example, other controls on the Web page can be automatically filled depending on the user's selection from a list control.

This property can be used to allow automatic population of other controls on the Web page based on a user's selection from a list.

The value of this property is stored in view state.

This property cannot be set by themes or style sheet themes. For more information, see ThemeableAttribute and ASP.NET Themes and Skins.

The following example demonstrates how to enable AutoPostBack for the ListBox control.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: