How can I call the same page with different parameters one after another

Hi Radzen Team,

(Please forgive me if this is a basic knowledge problem. I created my own solution. But I'm looking for an easier way.)

I designed a page calling with a parameter from the menu. (ex. This is basic data entering page that needs different dropdown content etc.) This page is working for each parameter without a problem. But I can't call this page one after another from the menu. The previous page stays on the screen with its own functionality (without error). There is become an unchanged content issue. But if a different page is selected from the menu before jumping to the next page (page with parameter) this issue does not appear.

So I prepared another page I called it RouterPage. The menu calls the RouterPage with a parameter for each menu item and the RouterPage navigate to the original page with the parameter.

Because fired another page (RouterPage) each time between two pages the unchanged content issue does not appear again.

I hope my explanation is clear enough.

Is there any other (and easy) solution?
Thanks,

I've tried to replicate such problem however everything worked normally for me. I've made application with two pages: main and second and I've placed two buttons in the main layout to navigate to second page with different parameter value:

The first button click:

The second button click:

The result:
navigate

Hi @enchev,

Thank you for your explanation.

Because your sample is not the exact same as my scenario (I used menu items instead of buttons), I thought can it be a problem? I had created a blank project and added a parameter page and two menu items as same as what I did in my original project (it's not the same content). The two pages are worked seamlessly. So this is not a Radzen issue.

Maybe it's a reason from Blazor. The address bar changes with the correct URL when I select one of the pages but the page doesn't refresh itself without F5. My problem is similar to this topic - blazor not changing the page when clicking on a link.

If I found the reason I'll be share.

I think you must implement OnParametersSetAsync() in 'pagename'.razor.cs

        protected override async Task OnParametersSetAsync()
        {
            await Load();
        }
1 Like

Hi @Thomas,
I'm sorry for my late response. Your suggestion is working smoothly.

Thanks