ASP.NET provides two ways to construct pages: In-line coding and code-behind. The in-line coding method has the code embedded right in the ASPX page, while the code-behind method provides a separate class file with an extension of .cs for C#, .vb for Visual Basic, and .vr for ASNA Visual RPG. ASNA Mobile RPG uses the code-behind method to allow for the separation of the presentation layer ASPX, and the programming code-behind that interacts with the presentation layer and the client and server.

For instance, the following is an example of the code-behind in the Sign-On.aspx.vr file provided with the initial installation of ASNA Mobile RPG. This code defines the assemblies used, defines partial class SignOn as ASNA.Monarch.WebDspF.Page and the method Page_Load, which controls the presentation of the ASPX file to the user. Refer to What is an ASPX Page for more information.


Using System
Using System.Data
Using System.Web
Using System.Web.SessionState
Using System.Web.UI
Using System.Web.UI.WebControls
Using System.Web.UI.HtmlControls

BegClass SignOn Partial(*Yes) Extends(ASNA.Monarch.WebDspf.Page)
	BegSr Page_Load Access(*Protected) Event(*this.Load)
		DclSrParm sender *object
		DclSrParm e EventArgs
	EndSr
EndClass