I am new to ASP.NET. Normally, when working with Windows Forms, you have events that trigger methods. For example, if a user clicks on a button, the btnRun_OnClick event is called, and the code control jumps to the first line in that method.
However, it appears that with the ASP.NET code below, when the user changes the selected item in a drop down control, a PostBack happens.
Question: Am I correctly assuming that in Windows Forms, events always call methods (Event Handlers), and in ASP.NET, events always are handled via PostBack? What if for the below code, I want to run some code in method Foo(), how would I do that?
<td class="ControlLayoutCell" colspan="2">
<cc1:I1Label runat="Server" ID="lblCCPaymentProcessor" Text="Credit Card Payment Processor:" CssClass="LabelGeneric" Width="100%" />
<cc1:I1DropDownList runat="server" ID="cboCCPaymentProcessor" Width="100%" TabIndex="90" AutoPostBack="true" OnSelectedItemChanged="cboCCPaymentProcessor_SelectedItemChanged"></cc1:I1DropDownList>