UpdatePanel::Update Method ()


Causes an update of the content of an UpdatePanel control.

Namespace:   System.Web.UI
Assembly:  System.Web.Extensions (in System.Web.Extensions.dll)

void Update()

Exception Condition

The UpdateMode property is set to Always.

- or –

The Update method is called during or after the page's Render event.

If the page is enabled for partial-page rendering, when you invoke the Update method, the UpdatePanel control's content is updated in the browser. Call the Update method if you have server code that must execute to determine whether an UpdatePanel control should be updated. If you plan to use the Update method, set the UpdateMode property to Conditional. If you want the decision to update the panel in server logic, make sure that the ChildrenAsTriggers property is false and that no explicit triggers are defined for the panel.

In a typical page development scenario, if you define triggers or if the ChildrenAsTriggers property is true for the UpdatePanel control, the Update method is automatically called during the page life cycle.

If the ContentTemplate property is not defined for the UpdatePanel control, no updates of the panel will occur.

The following example uses the Update method to update the content of an UpdatePanel control when more than five seconds have elapsed since the last update.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.5
Return to top