ASP.NET AutoPostBackProperty
ListControl Control Reference
Definition and Usage
The AutoPostBack property is used to set or return whether an automatic postback to the server occurs when the user selects an item in a list control.
If this property is set to TRUE, automatic postback is enabled; otherwise, it is FALSE. The default is FALSE.
Syntax
<asp:SomeListControl AutoPostBack="TRUE|FALSE" runat="server"/>
Example
The following example sets the AutoPostBack property of the RadioButtonList control to "TRUE":
<script runat="server">
Sub Change(obj As Object, e As EventArgs)
Response.Write("You selected " & rb1.SelectedItem.Text)
End Sub
</script>
<form runat=server>
<asp:RadioButtonList id="rb1" AutoPostBack="True"
runat="server" OnSelectedIndexChanged="Change">
<asp:ListItem Text="Item 1" />
<asp:ListItem Text="Item 2" />
</asp:RadioButtonList>
</form>
Sub Change(obj As Object, e As EventArgs)
Response.Write("You selected " & rb1.SelectedItem.Text)
End Sub
</script>
<form runat=server>
<asp:RadioButtonList id="rb1" AutoPostBack="True"
runat="server" OnSelectedIndexChanged="Change">
<asp:ListItem Text="Item 1" />
<asp:ListItem Text="Item 2" />
</asp:RadioButtonList>
</form>
Demo Example »
ListControl Control Reference Other Extensions