URL arguments

Welcome to Wisej Support.
Questions, suggestions and plain old bugs - are all welcome here!
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
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
0
0

Hi Rui,

In two ways:

Best,

Luca

  • You must to post comments
Showing 6 results
Your Answer
Post as a guest by filling out the fields below or if you already have an account.
Name*
E-mail*
Attachment
File Name Size
There are currently no files uploaded.
Maximum number of files 1, maximum file size 3.9MB.
Supported file formats: zip pdf gif jpg bmp png cs vb theme json