URL PARAMETERS

Answered
0
0

Hi Team!

I’m new to playing around with the Wisej framework. I’ve seen some topics in regards to URL parameters in the forum but I don’t have a clear scenario. What I just need to do is pass parameters through the URL to another wisej web page. I have test1 page, when I click on a button or link, I want to redirect to test2 page. So far, I know how to receive the parameters from the URL, BUT what I don’t know how to do is to SEND the parameters from one page to another. I know this was discussed on another thread but please if you can show me a small example, I’d be more than appreciative.

Thanks in advance!

Carlos

  • You must to post comments
Great Answer
0
0

Hi Carlos,

Wisej works pretty much like Winform and as far as navigation is concerned, you can just instantiate the page, add properties to it (in order to initialize them) and finally show it. If you want to redirect outside the Wisej application, you can use Application.Navigate(“url”).


Page1 page = new Page1();
page.Parameter1 = "value"; // Parameter1 can be a property of your Page1 class
page.Show();

Best,

Kevin(ITG)

  • Carlos Lino
    Hey Levie, thanks for your comment. Sorry if I was not clear in my question. When I say another Wisej page, I am referring to another instance of page in the same application. Look at the thread https://wisej.com/support/question/url-arguments someone posted a small sample to receive URL parameters, BUT I cannot find the way to SEND parameters, unless this is not possible in Wisej. I want to use the URL because that lets you send the link to another user so it can be loaded with the parameters directly.
  • Levie (ITG)
    Maybe you’re looking for Application.Hash? You can set and read it anywhere in the application. Otherwise you can use Application.Navigate(“?something=value”) to update the QueryString. Best, Levie
  • Carlos Lino
    One more question? What is the difference between Application.Hash and Application.Navigate? I see both do the same. Thank you!
  • Levie (ITG)
    Application.Navigate() is generally used to navigate to external webpages. Application.Hash changes the browser URL’s hash on the client, it’s useful for deep linking and fires the Application.HashChanged event. HTH, Levie
  • Carlos Lino
    Thank you Levie!
Showing 1 result
Your Answer

Please first to submit.