Is your feature request related to a problem? Please describe the problem.
Can I add TempData support to Blazor? This was possibly a nice feature I actually likes in ASP.NET MVC in Razor Pages. But is no longer supported in Blazor. Can I have permission to open a pull request for this?
Or we we have an alternative solution that would allow something similar?
Describe the solution you'd like
[RequirePermission(Permission.Provider_ResendEmailInvite)]
public async Task<IActionResult> ResendInvite(Guid ownerId, Guid providerId)
{
await _providerService.ResendProviderSetupInviteEmailAsync(providerId, ownerId);
TempData["InviteResentTo"] = ownerId;
return RedirectToAction("Edit", new { id = providerId });
}
Just imagine we could be setting the TempData in the form submission handler in Blazor, and then load the value again during initialization lifecycle of the component.
It is useful if you want to pass certain values to another page, although I admit the example above might be bad, as you might as well pass it as a request parameter, but you would still risk tampering with the values. TempData appears to be safer.
Is there an existing issue for this?
Is your feature request related to a problem? Please describe the problem.
Can I add
TempData
support to Blazor? This was possibly a nice feature I actually likes in ASP.NET MVC in Razor Pages. But is no longer supported in Blazor. Can I have permission to open a pull request for this?Or we we have an alternative solution that would allow something similar?
Describe the solution you'd like
Just imagine we could be setting the TempData in the form submission handler in Blazor, and then load the value again during initialization lifecycle of the component.
It is useful if you want to pass certain values to another page, although I admit the example above might be bad, as you might as well pass it as a request parameter, but you would still risk tampering with the values. TempData appears to be safer.
Additional context
https://github.com/dotnet/aspnetcore/blob/main/src/Mvc/Mvc.ViewFeatures/src/CookieTempDataProvider.cs#L17