Skip to content

Fix issue where name was doubled up when using EditorFor #2

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

Merged
merged 1 commit into from
Sep 2, 2013
Merged

Fix issue where name was doubled up when using EditorFor #2

merged 1 commit into from
Sep 2, 2013

Conversation

davidcarroll
Copy link
Contributor

Hi John,

I figured out a simpler way to fix this issue instead of futzing with the name. I just used TextBoxFor helper instead of the TextBox helper. This way, there is no need to pass in a name and MVC will just figure it out. Actually the only difference in the useNativeUnobtrusiveAttributes switch is we pass MVC your extended attributes instead of the original attributes.

All tests pass.

johnnyreilly added a commit that referenced this pull request Sep 2, 2013
Fix issue where name was doubled up when using EditorFor.
@johnnyreilly johnnyreilly merged commit b647205 into johnnyreilly:master Sep 2, 2013
@johnnyreilly
Copy link
Owner

@davidcarroll - that's brilliant; a much nicer solution!

I'm planning to push out a new version to Nuget within the next week and I'll include this with it. I'm just working on a globalization tweak that I want to ship at the same time.

Thanks so much for contributing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants