InputTagHelper respect name override from `IModelNameProvider.Name` in ModelExpression
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 281
Description
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Is your feature request related to a problem? Please describe the problem.
Let's imagen the following page model:
```cs
public class IndexModel : PageModel
{
[BindProperty(SupportsGet = true, Name = "public_name")]
public string? InternalUsedParameterName { get; set; }
public async Task OnGetAsync()
{ }
public async Task OnPostAsync()
{ }
}
```
```cshtml
@page "/"
@model IndexModel
```
### Describe the solution you'd like
While rendering the `InputTagHelper` should respect the name set by the `IModelNameProvider.Name` property and set the id and name html attributes accordingly.
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.