[Gambas-user] How to load a new page on gb.web by code

Benoît Minisini benoit.minisini at gambas-basic.org
Wed Sep 20 20:50:26 CEST 2023


Le 20/09/2023 à 20:23, Mayost Sharon a écrit :
> 
> Hello
> 
> Thanks again
> And sorry for the English translation
> 
> According to Benoît answer
> See gb.web
> You shouldn't manage multiple pages on the same project, so you can't switch from page to page
> If I understand correctly it should actually be a PHP joke that has several PHP pages
> Then I move from page to page via ACTION or REDIRECT
> In GB, then you need to create several projects, each project is a page, and then the transition between one and the other will also be with ACTION and REDIRECT
> But instead of writing the name of the page with a PHP dot, we at GB will write for example:
> prj_web1.gambas
> prj_web2.gambas
> prj_web3.gambas
> ...
> 
> Anyway, I'm also trying to reach a solution, I'm currently preparing an example.
> When I'm done I'll add it to this discussion
> And we will see if this is a correct solution
> 

No, you didn't understand.

You must create one WebPage for each page in one project.

Then you create a startup module Main, and from the Main method of that 
Main module, you choose the page you want to render, according to the 
value of 'Request.Path'.

Regards,

-- 
Benoît Minisini.



More information about the User mailing list