139 references to FormMethod
Microsoft.AspNetCore.Mvc.TagHelpers (1)
FormTagHelper.cs (1)
92/// or if the <c>method</c> is <see cref="FormMethod.Get"/>; <c>true</c> otherwise.</value>
Microsoft.AspNetCore.Mvc.TagHelpers.Test (7)
FormTagHelperTest.cs (7)
370[InlineData(null, FormMethod.Post, "<input />")] 371[InlineData(true, FormMethod.Post, "<input />")] 372[InlineData(false, FormMethod.Post, "")] 373[InlineData(null, FormMethod.Get, "")] 374[InlineData(true, FormMethod.Get, "<input />")] 375[InlineData(false, FormMethod.Get, "")] 378FormMethod method,
Microsoft.AspNetCore.Mvc.ViewFeatures (35)
HtmlHelper.cs (11)
231FormMethod method, 248FormMethod method, 641public static string GetFormMethodString(FormMethod method) 645case FormMethod.Get: 647case FormMethod.Post: 884/// <paramref name="method"/> is not <see cref="FormMethod.Get"/>. 900FormMethod method, 917var shouldGenerateAntiforgery = antiforgery ?? method != FormMethod.Get; 942/// <paramref name="method"/> is not <see cref="FormMethod.Get"/>. 957FormMethod method, 973var shouldGenerateAntiforgery = antiforgery ?? method != FormMethod.Get;
Rendering\HtmlHelperFormExtensions.cs (20)
31method: FormMethod.Post, 61method: FormMethod.Post, 78public static MvcForm BeginForm(this IHtmlHelper htmlHelper, FormMethod method) 110FormMethod method, 134/// <paramref name="method"/> is not <see cref="FormMethod.Get"/>. 149FormMethod method, 190method: FormMethod.Post, 219method: FormMethod.Post, 256FormMethod.Post, 279FormMethod method) 318FormMethod method) 354FormMethod method, 393method: FormMethod.Post, 428method: FormMethod.Post, 452method: FormMethod.Post, 481method: FormMethod.Post, 515FormMethod.Post, 536FormMethod method) 572FormMethod method) 605FormMethod method,
Rendering\IHtmlHelper.cs (4)
112/// <paramref name="method"/> is not <see cref="FormMethod.Get"/>. 128FormMethod method, 148/// <paramref name="method"/> is not <see cref="FormMethod.Get"/>. 163FormMethod method,
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (96)
DefaultEditorTemplatesTest.cs (2)
1431FormMethod method, 1441FormMethod method,
Rendering\HtmlHelperFormExtensionsTest.cs (50)
24private static readonly IEnumerable<FormMethod> _methods = new List<FormMethod> 26FormMethod.Get, 27FormMethod.Post, 54public static TheoryData<string, string, FormMethod> ActionNameControllerNameAndMethodDataSet 58var dataSet = new TheoryData<string, string, FormMethod>(); 63foreach (var method in _methods) 74public static TheoryData<string, string, FormMethod, object> ActionNameControllerNameMethodAndHtmlAttributesDataSet 78var dataSet = new TheoryData<string, string, FormMethod, object>(); 83foreach (var method in _methods) 117public static TheoryData<string, string, object, FormMethod> ActionNameControllerNameRouteValuesAndMethodDataSet 121var dataSet = new TheoryData<string, string, object, FormMethod>(); 128foreach (var method in _methods) 140public static TheoryData<FormMethod> MethodDataSet 144var dataSet = new TheoryData<FormMethod>(); 145foreach (var method in _methods) 154public static TheoryData<FormMethod, object> MethodAndHtmlAttributesDataSet 158var dataSet = new TheoryData<FormMethod, object>(); 159foreach (var method in _methods) 185public static TheoryData<string, FormMethod> RouteNameAndMethodDataSet 189var dataSet = new TheoryData<string, FormMethod>(); 192foreach (var method in _methods) 202public static TheoryData<string, FormMethod, object> RouteNameMethodAndHtmlAttributesDataSet 206var dataSet = new TheoryData<string, FormMethod, object>(); 209foreach (var method in _methods) 239public static TheoryData<string, object, FormMethod> RouteNameRouteValuesAndMethodDataSet 243var dataSet = new TheoryData<string, object, FormMethod>(); 248foreach (var method in _methods) 382public void BeginFormWithMethodParameter_CallsHtmlGeneratorWithExpectedValues(FormMethod method) 399if (method != FormMethod.Get) 425FormMethod method, 443if (method != FormMethod.Get) 469FormMethod method, 509FormMethod method, 666FormMethod method) 683if (method != FormMethod.Get) 712FormMethod method) 729if (method != FormMethod.Get) 757FormMethod method, 775if (method != FormMethod.Get) 803FormMethod method, 851FormMethod method, 1151FormMethod method) 1167if (method != FormMethod.Get) 1195FormMethod method) 1211if (method != FormMethod.Get) 1238FormMethod method, 1255if (method != FormMethod.Get) 1282FormMethod method, 1327FormMethod method,
Rendering\HtmlHelperFormTest.cs (40)
21public static TheoryData<string, string, object, FormMethod, object> BeginFormDataSet 25return new TheoryData<string, string, object, FormMethod, object> 28null, null, null, FormMethod.Get, null 31"Details", "Product", null, FormMethod.Get, null 34"Details", "Product", null, FormMethod.Post, null 37"Details", "Product", new { isprint = "false", showreviews = "false" }, FormMethod.Get, null 40"Details", "Product", new { isprint = "false", showreviews = "true" }, FormMethod.Post, null 43"Details", "Product", new { isprint = "true", showreviews = "false" }, FormMethod.Get, 47"Details", "Product", new { isprint = "true", showreviews = "true" }, FormMethod.Post, 53FormMethod.Get, 59FormMethod.Post, 67public static TheoryData<string, object, FormMethod, object> BeginRouteFormDataSet 71return new TheoryData<string, object, FormMethod, object> 74null, null, FormMethod.Get, null 77null, null, FormMethod.Post, null 80"default", null, FormMethod.Get, null 83"default", null, FormMethod.Post, null 86"default", new { isprint = "false", showreviews = "false" }, FormMethod.Get, null 89"default", new { isprint = "false", showreviews = "true" }, FormMethod.Post, null 92"default", new { isprint = "true", showreviews = "false" }, FormMethod.Get, 96"default", new { isprint = "true", showreviews = "true" }, FormMethod.Post, 102FormMethod.Get, 108FormMethod.Post, 148method: FormMethod.Post, 198method: FormMethod.Post, 218FormMethod method, 267FormMethod method, 432using (var form = htmlHelper.BeginForm(FormMethod.Post, antiforgery: null, htmlAttributes: null)) 471using (var form = htmlHelper.BeginForm(FormMethod.Post, antiforgery: false, htmlAttributes: null)) 509using (var form = htmlHelper.BeginForm(FormMethod.Get, antiforgery: null, htmlAttributes: null)) 519[InlineData(FormMethod.Get)] 520[InlineData(FormMethod.Post)] 521public void BeginForm_EndForm_DoesNotSuppressAntiforgeryTokenWhenAntiforgeryIsTrue(FormMethod method) 588using (var form = htmlHelper.BeginForm(FormMethod.Post, antiforgery: false, htmlAttributes: null)) 668method: FormMethod.Post, 711method: FormMethod.Post, 753method: FormMethod.Get, 765[InlineData(FormMethod.Get)] 766[InlineData(FormMethod.Post)] 767public void BeginRouteForm_EndForm_DoesNotSuppressAntiforgeryTokenWhenAntiforgeryIsTrue(FormMethod method)
Rendering\HtmlHelperTest.cs (4)
380[InlineData(FormMethod.Get, "get")] 381[InlineData(FormMethod.Post, "post")] 382[InlineData((FormMethod)42, "post")] 383public void GetFormMethodString_ReturnsExpectedValues(FormMethod method, string expected)