> For the complete documentation index, see [llms.txt](https://muradkarakas.gitbook.io/sodium_documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://muradkarakas.gitbook.io/sodium_documentation/language-reference/program-structure/code-behind-file.md).

# Code Behind File

* Code behind files are the files with \*.sqlx extension.
* Code behind files are used to separate application code with HTML.
* Each [Form File](https://muradkarakas.github.io/Sodium-Manual/frmx_file.html) has a code behind file with the same name but with ".sqlx" extension.
* Code behind files are automatically loaded and parsed just before the corresponding form file (frmx file) is parsed.
* Mostly used to hold page specific variables and functions' definitions. For functions and variables related to business logic, please use [Controller File](https://muradkarakas.github.io/Sodium-Manual/controller_file.html).

Developer can;

* write a special ["page.access" trigger](https://muradkarakas.github.io/Sodium-Manual/page_access.html) function in each code behind file in order to control page access.
* write a special ["page\_load" trigger](https://muradkarakas.github.io/Sodium-Manual/page_load.html) function to run code blocks funcafter form file parsing and before sending its content.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://muradkarakas.gitbook.io/sodium_documentation/language-reference/program-structure/code-behind-file.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
