Home > database >  Redirecting in blazor with parameter object
Redirecting in blazor with parameter object

Time:05-30

I have the answer but I want to receive an object and not with a string or integer how do I?

Redirecting in blazor with parameter

[Parameter]
public Produto? produto { get; set; }

_navigationManager.NavigateTo("/login", produto);

CodePudding user response:

You should add the object as a set of query string parameters, or serialise it to JSON, so that the receiving page can deserialise it.

  • Related