Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

How to send value from edit form between pages in Blazor

$
0
0

So, I have an application in Blazor Server and I have two pages. On the first page the user introduces his Username and after he clicks the login button I want to show on the second page the Username he introduced. I tried with routing parameters, but I don't know if that's the right way because I'm new to Blazor.

@page "/firstPage"<EditForm Model="@user" OnValidSubmit="@Login"><label class="form-control-label text-muted">Username</label> <input type="text" id="username" name="username" @bind="user.Username"> <button class="btn-block btn-color">Login</button></EditForm>@page "/secondPage"//here I want to show the username from the first page

Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>