# Best practice when overriding a page life cycle event

**URL:** <https://discuss.workflowgen.com/t/best-practice-when-overriding-a-page-life-cycle-event/302>\
**Category:** Form Designer\
**Created:** [August 31, 2016, 12:33am UTC](https://discuss.workflowgen.com/t/best-practice-when-overriding-a-page-life-cycle-event/302 "2016-08-31T00:33:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wfg-admin](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.workflowgen.com/wfg-admin/32/714_2.png) [@wfg-admin](https://discuss.workflowgen.com/u/wfg-admin)\
**Post date:** [August 31, 2016, 12:33am UTC](https://discuss.workflowgen.com/t/best-practice-when-overriding-a-page-life-cycle-event/302/1 "2016-08-31T00:33:45Z")

</div>

In the Form Designer, if you add your own custom .NET code to override a page life cycle event, you must call its `base._[PageEvent](sender, e)`.

**Example**

```auto
protected void Page_PreRender(object sender, EventArgs e) 
{
   base.Page_PreRender(sender, e);
   
   //Custom code
}

```

For more information on life cycle events, see the [ASP.NET Page Life Cycle Overview](https://msdn.microsoft.com/en-us/library/ms178472.aspx) MSDN article.
