ComponentOne Expander for ASP.NET Web Forms
Task-Based Help / Setting Post Back
In This Topic
    Setting Post Back
    In This Topic

    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" 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:

    To write code in Visual Basic

    Visual Basic
    Copy Code
    Me.C1Expander1.AutoPostBack = True
    

    To write code in C#

    C#
    Copy Code
    this.C1Expander1.AutoPostBack = true;
    
    See Also