Set Global Variable in Main Layout

I tried to set-up several Global variables in the Load() of the Main Layout. Code generation doesn't seem to work like it does when this is done on a page Load().

Is this behavior on purpose? Am I missing something?

Johnny

Worked normally for me:



My Global variable is a string. I've tried to navigate off of the layout too, but it is not generating the code in the GlobalService. I put it in the Load() event btw.

Weird!

Aha! Code generation doesn't occur when you move to other layouts or pages, but it does when you run the app from Radzen IDE. I'm using Visual Studio 2019 to debug and watch code. Okay, this gives me a workaround.

Thank-you.