ComponentOne Expander for ASP.NET AJAX: Expander for ASP.NET AJAX Task-Based Help > Setting Post Back

Setting Post Back

You can easily set whether or not C1Expander automatically posts back to the server by using the AutoPostBack property. By default the AutoPostBack property is set to False and the C1Expander control does not automatically post back to the server; to allow C1Expander to post back to the server, set AutoPostBack to True.

In Source View

In Source view add AutoPostBack="True" to the <cc1:C1Expander> tag so it appears similar to the following:

<cc1:C1Expander ID="C1Expander1" runat="server" HeaderSize="25px" Height="200px" Width="100px" AutoPostBack="True">

In Design View

In Design view select the C1Expander control and in the Properties window set the AutoPostBack property to True.

In Code

Add the following code to the Page_Load event to set the AutoPostBack property to True:

      Visual Basic

Me.C1Expander1.AutoPostBack = True

      C#

this.C1Expander1.AutoPostBack = true;


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.