The requested page is not available for the requested platform. You are viewing the content for Default platform.

WebApplication.ControlsCreating Event

Occurs before creating controls for the Web Forms page.

Namespace: DevExpress.ExpressApp.Web

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


public event EventHandler<ControlsCreatingEventArgs> ControlsCreating
Public Event ControlsCreating As EventHandler(Of ControlsCreatingEventArgs)

Event Data

The ControlsCreating event handler receives an argument of the ControlsCreatingEventArgs type. The following properties provide information specific to this event.

Property Description
Page Gets the Web Forms page.


The ControlsCreating event is raised as the result of executing the WebApplication.CreateControls method. Handle this event to access a Page object, before its controls are created. This object is accessible via the ControlsCreatingEventArgs.Page parameter.

using DevExpress.ExpressApp.Web;
// ...
public class MyController : Controller {
    protected override void OnActivated() {
        ((WebApplication)Application).ControlsCreating += Instance_ControlsCreating;
    private void Instance_ControlsCreating(object sender, ControlsCreatingEventArgs e) {
        // Access the Page object via the e.Page parameter:
        e.Page.PreRender += Page_PreRender;
        // ...
    // ...
    protected override void OnDeactivated() {
        WebApplication webApplication = ((WebApplication)Application);
        if(webApplication != null) {
            webApplication.ControlsCreating -= Instance_ControlsCreating;
See Also