ComponentOne TabControl for ASP.NET AJAX: TabControl for ASP.NET AJAX Task-Based Help > Setting C1TabControl Behaviors > Setting Automatic Postback

Setting Automatic Postback

Using the AutoPostBack property, you can choose whether the C1TabControl control will automatically post back to the server between tab clicks and page views. By default, the AutoPostBack property is set to False, meaning that the control does not automatically post back to the server. However, you can easily set up the C1TabControl to post back to the server by setting this property to True. In this topic, you will set the AutoPostBack property to True in Design view, in Source view, and in code.

In Design View

Complete the following steps:

1.   Click C1TabControl's smart tag () to open the C1TabControl Tasks menu and select TabControl Designer.

The C1TabControl Designer Form appears.

2.   In treeview, select C1TabControl1 to reveal its list of properties.

3.   Locate the AutoPostBack property and set it to True.

 

 

4.   Press OK to close the C1TabControl Designer Form.

In Source View

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

 

<cc1:C1TabControlID="C1TabControl1" runat="server" AutoPostBack="True">

In Code

Add the following code to the Page_Load event to set AutoPostBack in code:

      Visual Basic

Me.C1TabControl1.AutoPostBack = True

      C#

this.C1TabControl1.AutoPostBack = true;


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