# C1.Report.FlexReport.OnPage

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Report_FlexReport_OnPage_" data-uid="C1.Report.FlexReport.OnPage*">OnPage Property
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Report_FlexReport_OnPage_" data-uid="C1.Report.FlexReport.OnPage*"></a>
<h4 id="C1_Report_FlexReport_OnPage" data-uid="C1.Report.FlexReport.OnPage">OnPage</h4>
<div class="markdown level1 summary"><p>Gets or sets the <b>VBScript</b> that is executed when a new page is created.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">[C1Category(&quot;Script&quot;)]
[C1Description(&quot;C1FlexReport.OnPage&quot;, &quot;Script executed when a new page is created.&quot;)]
[Browsable(false)]
public string OnPage { get; set; }</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">&lt;C1Category(&quot;Script&quot;)&gt;
&lt;C1Description(&quot;C1FlexReport.OnPage&quot;, &quot;Script executed when a new page is created.&quot;)&gt;
&lt;Browsable(False)&gt;
Public Property OnPage As String</code></pre>
</div>
<h5 id="C1_Report_FlexReport_OnPage_remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>The control also fires the <a class="xref" href="C1.Report.FlexReport.StartPage.html">StartPage</a> event at this time.</p>
<p>The difference between the regular event and the VBScript property is that the handler for the regular event 
belongs to the application, and should thus be used to support tasks that are independent of the report.
For example, to update a label showing how many pages have been rendered so far.</p>
<p>The VBScript handler in the property belongs to the report, and will be executed regardless of the application.
For example, a report might contain a VBScript handler that updates a variable at every page break.</p>
</div>
</div>
