Click here to Skip to main content
15,879,095 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I work on asp.net razor page .i face issue when navigate to page after make submit it reset all values on page

I read more the issue will solved by using hidden fields

so suppose I have asp.net razor page have username and email

and i need store fields of username and email on hidden fields to be available after submit post

so can you provide to me sample to store username and email on hidden fields so prevent value from reset after submit and can navigate to other pages

so Can you please provide to me sample please ?

What I have tried:

How to clear data after submit post
Posted
Updated 5-Jul-23 13:28pm

1 solution

Gpoogle search has many examples of how to do this simple task: asp.net core hidden field - Google Search[^].

Here is the first search result: Using Hidden fields in ASP.NET CORE - Tutexchange[^]

From their example:
ASP.NET
<input asp-for="ProductId? type="hidden"/>
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900