ASP 101 - Active Server Pages 101 autopostback.aspx
<%@ Page Language="VB" %>
<script language="VB" runat="server">
	Sub Page_Load(Sender As Object, E As EventArgs)
		' Set the text of the label controls to reflect the
		' values entered or selected in the form.
		If myCheckBox.Checked Then
			lblCheckBox.Text = "checked"
			lblCheckBox.Text = "did not check"
		End If
		lblTextBox.Text = myTextBox.Text
		lblDropDownList.Text = myDropDownList.SelectedItem.Value
	End Sub
  <title>ASP.NET AutoPostBack Sample</title>
<form runat="server">
	It's the AutoPostBack property that really does all
	the magic here.  Whenever a control loses focus, if
	the value of the contol has changed, the page is
	automatically resubmitted (or posted back) to the
	server so the page can process the new values.
	<asp:TextBox id="myTextBox" runat="server"
	<asp:DropDownList id="myDropDownList" runat="server"
		<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:ListItem>Item 6</asp:ListItem>
	<asp:CheckBox id="myCheckBox" runat="server"
	You entered
	"<asp:Label id="lblTextBox" runat="server" />"
	in the text box, selected
	"<asp:Label id="lblDropDownList" runat="server" />"
	from the drop down list, and
	<asp:Label id="lblCheckBox" runat="server" />
	the checkbox.
<hr />
Click <a href="">here</a>
to read about and download the source code.