Skip to content
This repository was archived by the owner on Dec 14, 2018. It is now read-only.

asp-page-handler doesn't work correctly if asp-page isn't also specified #6208

Closed
DamianEdwards opened this issue Apr 26, 2017 · 1 comment
Closed

Comments

@DamianEdwards
Copy link
Member

DamianEdwards commented Apr 26, 2017

See https://github.com/DamianEdwards/RazorPagesSample/blob/master/RazorPagesWebApplication/Pages/Account/Manage/ExternalLogins.cshtml#L28

It ends up with no action attribute being added to the form at all.

If I use asp-route-handler by itself it works fine.

@pranavkm @rynowak

@DamianEdwards DamianEdwards added this to the 2.0.0-preview1 milestone Apr 26, 2017
DamianEdwards added a commit to DamianEdwards/RazorPagesSample that referenced this issue Apr 26, 2017
NTaylorMullen added a commit that referenced this issue Apr 26, 2017
- Prior to this change using asp-page-handler on its own did not create correct `<form>` elements. There were multiple issues, one as that the `FormTagHelper` would purposefully drop into a no-op code path. Second is the `DefaultHtmlGenerator` didn't call through to the `UrlHelper` correctly.
- Added functional test cases to validate asp-page-handler can live on its own on a form tag. This also included adding a variant where method="post".
- Added a `FormTagHelper` unit test to validate the `PageHandler` property is consumed properly.

#6208
NTaylorMullen added a commit that referenced this issue Apr 27, 2017
- Prior to this change using asp-page-handler on its own did not create correct `<form>` elements. There were multiple issues, one as that the `FormTagHelper` would purposefully drop into a no-op code path. Second is the `DefaultHtmlGenerator` didn't call through to the `UrlHelper` correctly.
- Added functional test cases to validate asp-page-handler can live on its own on a form tag. This also included adding a variant where method="post".
- Added a `FormTagHelper` unit test to validate the `PageHandler` property is consumed properly.

#6208
NTaylorMullen added a commit that referenced this issue Apr 27, 2017
- Prior to this change using asp-page-handler on its own did not create correct `<form>` elements. There were multiple issues, one as that the `FormTagHelper` would purposefully drop into a no-op code path. Second is the `DefaultHtmlGenerator` didn't call through to the `UrlHelper` correctly.
- Added functional test cases to validate asp-page-handler can live on its own on a form tag. This also included adding a variant where method="post".
- Added a `FormTagHelper` unit test to validate the `PageHandler` property is consumed properly.

#6208
NTaylorMullen added a commit that referenced this issue Apr 27, 2017
- Prior to this change using asp-page-handler on its own did not create correct `<form>` elements. There were multiple issues, one as that the `FormTagHelper` would purposefully drop into a no-op code path. Second is the `DefaultHtmlGenerator` didn't call through to the `UrlHelper` correctly.
- Added functional test cases to validate asp-page-handler can live on its own on a form tag. This also included adding a variant where method="post".
- Added a `FormTagHelper` unit test to validate the `PageHandler` property is consumed properly.

#6208
@NTaylorMullen
Copy link
Contributor

28e16ed
8bece90

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

No branches or pull requests

4 participants