Question How to pass data from a page to another in Blazor

Pablo

Well-known member
Joined
Aug 12, 2021
Messages
78
Programming Experience
10+
Hi all,
So I'm progressing in my web dev learning. Now I'm working on a project that is not from a tutorial, but on my own.
I have on my clientList page a click event handler method that takes me to the editClient page, and I have to pass an Id to it, and I can't figure how.
My method looks like this by now (Navigator is an injected NavigationManager).
C#:
private void UpdateClient()
{
    Navigator.NavigateTo("AddEditClient");
}
Thanks
Pablo
 
Solution
Do you really need to navigate to a new page? Can't you just render a different view?

But if you must navigate to a another page, as I recall that parameter is actually a URI. Recall that you can pass query parameters in a URI (e.g. path?param1=value1&param2=value2).
Do you really need to navigate to a new page? Can't you just render a different view?

But if you must navigate to a another page, as I recall that parameter is actually a URI. Recall that you can pass query parameters in a URI (e.g. path?param1=value1&param2=value2).
 
Solution

Latest posts

Back
Top Bottom