Skip to content

Render correct input value when form post contains field with same name. #55346

New issue

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

Closed
wants to merge 1 commit into from
Closed

Render correct input value when form post contains field with same name. #55346

wants to merge 1 commit into from

Conversation

gbourass
Copy link

@gbourass gbourass commented Apr 24, 2024

Render correct input value when form post contains field with same name.

  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.

Summary of the changes (Less than 80 chars)

Description

Don't override the given value by what is in the context.

Fixes #52150

@ghost ghost added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Apr 24, 2024
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Apr 24, 2024
@gbourass gbourass changed the title 52150 Render correct value when form post contains field with same name. Render correct value when form post contains field with same name. Apr 24, 2024
@gbourass gbourass changed the title Render correct value when form post contains field with same name. Render correct input value when form post contains field with same name. Apr 24, 2024
@mkArtakMSFT mkArtakMSFT added area-ui-rendering Includes: MVC Views/Pages, Razor Views/Pages and removed area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates labels Apr 24, 2024
@gbourass
Copy link
Author

Microsoft.AspNetCore.Mvc.Rendering.HtmlHelperHiddenTest.HiddenFor_UsesModelStateValueOverPropertyValue ensures the opposite behavior.

@gbourass gbourass closed this Apr 24, 2024
@dotnet-policy-service dotnet-policy-service bot added this to the 9.0-preview5 milestone Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-ui-rendering Includes: MVC Views/Pages, Razor Views/Pages community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multiple form inputs with the same name render incorrect output.
3 participants