Skip to main content
.NET Framework 4.5.2+
  • The page you are viewing does not exist in the .NET 6.0+ platform documentation. This link will take you to the parent topic of the current section.

DevExpress v24.1 Update — Your Feedback Matters

Our What's New in v24.1 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

WebWindow.PagePreRender Event

Occurs after the WebWindow‘s Web Forms page is loaded, but prior to rendering.

Namespace: DevExpress.ExpressApp.Web

Assembly: DevExpress.ExpressApp.Web.v24.1.dll

NuGet Package: DevExpress.ExpressApp.Web

#Declaration

public event EventHandler PagePreRender

#Event Data

The PagePreRender event's data class is EventArgs.

#Remarks

Handle this event to perform any updates before the Window’s page is rendered. The page can be accessed via the Window.Template property.

using System.Web.UI;
using DevExpress.ExpressApp.Web;
//...
public class MyController : WindowController {
    protected override void OnActivated() {
        base.OnActivated();
        ((WebWindow)Window).PagePreRender += PagePreRender;
    }
    protected override void OnDeactivated() {
        ((WebWindow)Window).PagePreRender -= PagePreRender;
        base.OnDeactivated();
    }
    private void PagePreRender(object sender, EventArgs e) {
        // Access the page via the Template property:           
        ControlCollection pageControls = (((WebWindow)sender).Template as Page).Controls;
        // ...
    }
}

The following code snippets (auto-collected from DevExpress Examples) contain references to the PagePreRender event.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also