Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
/MvcPublic archive

Commita2feeab

Browse files
committed
Changed the form tag helpers execution order to be more explicit.
[Fixes#4824] Fix Travis failure for test Microsoft.AspNetCore.Mvc.FunctionalTests.TagHelpersTest.ReregisteringAntiforgeryTokenInsideFormTagHelper_DoesNotAddDuplicateAntiforgeryTokenFields
1 parent55e9adf commita2feeab

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

‎src/Microsoft.AspNetCore.Mvc.TagHelpers/FormTagHelper.cs‎

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,10 @@ public FormTagHelper(IHtmlGenerator generator)
4141
Generator=generator;
4242
}
4343

44+
// This TagHelper's order must be lower than the RenderAtEndOfFormTagHelper. I.e it must be executed before
45+
// RenderAtEndOfFormTagHelper does.
4446
/// <inheritdoc />
45-
publicoverrideintOrder
46-
{
47-
get
48-
{
49-
return-1000;
50-
}
51-
}
47+
publicoverrideintOrder=>-1000;
5248

5349
[HtmlAttributeNotBound]
5450
[ViewContext]

‎src/Microsoft.AspNetCore.Mvc.TagHelpers/RenderAtEndOfFormTagHelper.cs‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
1818
[HtmlTargetElement("form")]
1919
publicclassRenderAtEndOfFormTagHelper:TagHelper
2020
{
21-
publicoverrideintOrder=>-1000;
21+
// This TagHelper's order must be greater than the FormTagHelper's. I.e it must be executed after
22+
// FormTaghelper does.
23+
/// <inheritdoc />
24+
publicoverrideintOrder=>-900;
2225

2326
[HtmlAttributeNotBound]
2427
[ViewContext]

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp