We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In .NET 8 RC2 we introduced some new attributes that Blazor users can use to control enhanced navigation and form handling:
data-enhance-nav: Used to turn off enhanced navigation for a specific link or DOM subtree
data-enhance-nav
<a href="my-non-blazor-page" data-enhance-nav="false">My Non-Blazor Page</a>
data-enhance: Used to opt in to enhanced form handling for a form element:
data-enhance
<form method="post" @onsubmit="() => submitted = true" @formname="name" data-enhance> <AntiforgeryToken /> <InputText @bind-Value="Name" /> <button>Submit</button> </form> @if (submitted) { <p>Hello @Name!</p> } @code{ bool submitted; [SupplyParameterFromForm] public string Name { get; set; } = ""; }
data-permanent: Used to signal that an element add or updated dynamically should be preserved when handling an enhanced navigation of form request:
data-permanent
<div data-permanent> This div gets updated dynamically by a script when the page loads! </div>
We should update the Razor tooling to provide appropriate completions and diagnostic for these attributes.
Related PRs:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In .NET 8 RC2 we introduced some new attributes that Blazor users can use to control enhanced navigation and form handling:
data-enhance-nav
: Used to turn off enhanced navigation for a specific link or DOM subtreedata-enhance
: Used to opt in to enhanced form handling for a form element:data-permanent
: Used to signal that an element add or updated dynamically should be preserved when handling an enhanced navigation of form request:We should update the Razor tooling to provide appropriate completions and diagnostic for these attributes.
Related PRs:
The text was updated successfully, but these errors were encountered: