Please enable JavaScript to view this site.

Navigation: Advanced topics > Events > Global events > Login page

Before display

Scroll Prev Next More


The Before Display event is executed right before a page is displayed in the browser. Use this event to modify the value of any template variable or to define a new one.


public XVar BeforeShow(dynamic xt, dynamic pageObject)



a template engine object. Use xt.assign(name, val) to assign a value val to the variable name.


an object representing the current page. For more information, see RunnerPage class.

Applies to pages

List, Add, Print, Search, Export, Report, Chart, Login, Register, Password reminder, Change password, Menu.


To display some text on the List page:


1. Proceed to the Editor page.


2. Switch to HTML mode and find the line {END container_recordcontrols}. Add the following code right before it:




3. Add the following code to the BeforeDisplay event.




var str = "<b>Today is </b><i>" + DateTime.Now.ToString() + "</i>";
xt.assign("sample_code", str);

Recommended sample events:

Hide controls on Add/Edit pages, based on logged user name

See also:

Template language

About templates

ASPRunner.NET templates

Choose pages screen

Creating charts

Working with common pages

Menu builder