This component enables routing in Blazor apps and supplies route data corresponding to the current navigation state. How does the number of copies affect the diamond distance? For each value, the framework uses value?.GetType() to determine the runtime type for each query parameter and selects the correct culture-invariant formatting. The Router component supports an OnNavigateAsync feature. Basically it prevents a default browser behavior when clicking the submit button. This code, for example, creates a custId property that will automatically be loaded with the value from the custId parameter I defined in my earlier page directive: I can now use that property in my Razor page just by prefixing with the usual @ sign, like this: You need to be aware of when your component is instantiated, though. The user can initiate redirecting in several ways. If you wish to redirect the user, then you can use the good old anchor tags in HTML. To learn more, see our tips on writing great answers. Then I added a Hello method within the @code section. 2-Day Hands-On Training Seminar: Design, Build and Deliver a Microservices Solution the Cloud Native Way. By accepting all cookies, you agree to our use of cookies to deliver and maintain our services and site, improve the quality of Reddit, personalize Reddit content and advertising, and measure the effectiveness of advertising. await _js.InvokeAsync