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
This commit is contained in:
Kiran Challa 2016-06-10 09:55:22 -07:00
parent 55e9adf84d
commit a2feeab545
2 changed files with 7 additions and 8 deletions

View File

@ -41,14 +41,10 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
Generator = generator;
}
// This TagHelper's order must be lower than the RenderAtEndOfFormTagHelper. I.e it must be executed before
// RenderAtEndOfFormTagHelper does.
/// <inheritdoc />
public override int Order
{
get
{
return -1000;
}
}
public override int Order => -1000;
[HtmlAttributeNotBound]
[ViewContext]

View File

@ -18,7 +18,10 @@ namespace Microsoft.AspNetCore.Mvc.TagHelpers
[HtmlTargetElement("form")]
public class RenderAtEndOfFormTagHelper : TagHelper
{
public override int Order => -1000;
// This TagHelper's order must be greater than the FormTagHelper's. I.e it must be executed after
// FormTaghelper does.
/// <inheritdoc />
public override int Order => -900;
[HtmlAttributeNotBound]
[ViewContext]