ASP.NET(vb.net) & AutoPostBack=”true” - AutoPostBack=”true” : This tag control for auto submit to postback where user click or change current control.
ShotDev Focus:
- ASP.NET(vb.net) & AutoPostBack=”true”
Example
AutoPostBack.aspx
<%@ Page Language="VB" %> <script runat="server"> Sub ListBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Me.lblText1.Text = Me.ListBox1.SelectedItem.Text End Sub </script> <html> <head> <title>ShotDev.Com Tutorial</title> </head> <body> <form runat="server"> <asp:ListBox id="ListBox1" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ListBox1_SelectedIndexChanged"> <asp:ListItem>Item 1</asp:ListItem> <asp:ListItem>Item 2</asp:ListItem> <asp:ListItem>Item 3</asp:ListItem> <asp:ListItem>Item 4</asp:ListItem> <asp:ListItem>Item 5</asp:ListItem> </asp:ListBox> <br /> <br /> <asp:Label id="lblText1" runat="server"></asp:Label> </form> </body> </html>
Screenshot