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

Setting Automatic Postback

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

Setting AutoPostBack in Design View

Complete the following steps to set AutoPostBack:

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

      The C1MultiPage Designer Form appears.

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

3.   Locate AutoPostBack and set it to True.

4.   Press OK to close the C1MultiPage Designer Form.

Setting AutoPostBack in Source View

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

 

<cc1:C1MultiPage ID="C1MultiPage1" runat="server" AutoPostBack="True">

Setting AutoPostBack in Code

Complete the following steps to set AutoPostBack:

1.   Import the following namespace into your project:

      Visual Basic

Imports C1.Web.UI.Controls.C1MultiPage

      C#

using C1.Web.UI.Controls.C1MultiPage;

2.   Set AutoPostBack to True by adding the following code to the Page_Load event:

      Visual Basic

C1MultiPage1.AutoPostBack = True

      C#

C1MultiPage1.AutoPostBack = true;

3.   Run the project.


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