How to pass arguments variables in the application URL?
In VWG we have something like this:
../Post.Mainform.wgx?Name=Aaa&Pwd=xpto
And how we get them in code side?
Thanks & regards,
Rui
Hi Rui,
In two ways:
Best,
Luca
Hi Sebastian,
I have setup a small sample that shows to extract the URL parameters:
Download the sample here
Hope that helps.
Best regards
Frank
Hi Sebastian, the arguments go after the URL:
http://localhost/myapp?arg1=hello
In your code you will find the startup arguments in Program.Main(NameValueCollection args) and always in Application.QueryString (which uses the same collection as HttpContext.QueryString).
AlertBox.Show(Application.QueryString[“arg1”]);
Best,
Luca
I still can not get the URL parameters.
Application.QueryString always returns 0.
Do I enter the parameters in the URL?
No, Wisej pages are standard html, aspx, mvc, or anything else that the browser can load.
http://localhost/myapp/default.html
http://localhost/myapp/default.html?arg=1
All work.
Is necessary use the “Post” string in URL too?
Thanks & Regards,
Rui