![]() |
How not refresh parameter - Printable Version +- Atozed Forums (https://www.atozed.com/forums) +-- Forum: Atozed Software Products (https://www.atozed.com/forums/forum-1.html) +--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html) +---- Forum: English (https://www.atozed.com/forums/forum-16.html) +----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html) +----- Thread: How not refresh parameter (/thread-3097.html) |
How not refresh parameter - matija - 03-28-2023 If directly (first) write URL http://localhost/details?number=1 then read details and then change URL http://localhost/details?number=2 and then not read details! I have to close browser it work. Where/How do I need to read the URL parameter again? What wrong in my code? My code: IWServerControllerBaseConfig -> with THandlers.Add('', '/Details', TContentForm.Create(TDetailsForm)) do begin CanStartSession := true; RequiresSessionStart := false; end; IWServerControllerBaseGetMainForm -> if WebApplication.RunParams.Count>0 then begin if UserSession.param= 'number' then vMainForm:=TDetailsForm.Create(WebApplication) else vMainForm:=TDetailsForm.Create(WebApplication); end else vMainForm:=TMainForm.Create(WebApplication); TDetailsForm.IWAppFormShow -> if (WebApplication.RunParams.IndexOfName('number') <> -1) then UserSession.param := WebApplication.RunParams.Values['number']; RE: How not refresh parameter - Alexandre Machado - 04-10-2023 RunParams is a property that is only set once when the session starts. If you want to read any URL parameter received in any request at any time use WebApplication.Request.Params property. On the other hand, if you use WebApplication.RunParams property, you will get the parameters that were sent to IW application when that specific session started, if any. |