[SOLVED] URL arguments

Answered Closed
2
1

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

  • You must to post comments
Best Answer
0
0

Hi Rui,

In two ways:

Best,

Luca

  • You must to post comments
0
0

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

  • You must to post comments
0
0

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

  • Sebastián Serrisuela
    I still can not get the URL arguments. This is my URL: http://localhost:4988/Quirofano?sid=15 My JSON: “startup”: “Quirofano.Program.Main, Quirofano” Is there any configuration in the project?
  • Frank (ITG)
    Hi Sebastian, sid and lang cannot be used for that purpose. Those 2 are reserved for Wisej. Hope that helps, Frank.
  • Sebastián Serrisuela
    Thank you! I already take the argument. Now, if I change the value of the argument in the URL, it does not take the change. You need a POST (like VWG)
  • You must to post comments
0
0

I still can not get the URL parameters.
Application.QueryString always returns 0.
Do I enter the parameters in the URL?

  • You must to post comments
0
0

No, Wisej pages are standard html, aspx, mvc, or anything else that the browser can load.

http://localhost/myapp

http://localhost/myapp/default.html

http://localhost/myapp?arg=1

http://localhost/myapp/default.html?arg=1

All work.

  • You must to post comments
0
0

Is necessary use the “Post” string in URL too?

Thanks & Regards,

Rui

  • You must to post comments
Showing 6 results