How do I pass this code that is on a .cs page to a cshtml page.
ApplicationUser user = await UserManager.GetUserAsync(User);
This page is the layout, has no Model and no DTO.
Thank you
How do I pass this code that is on a .cs page to a cshtml page.
ApplicationUser user = await UserManager.GetUserAsync(User);
This page is the layout, has no Model and no DTO.
Thank you
I did not quite understand the question, but you can try to use ViewData to send data from a .cs file to a .cshtml
Example .cs:
public IActionResult Index(){ ViewData["Codigo"] = user; }
Example .cshtml:
<h1> @ViewData["Codigo"] </h1>