This change modifies the default parameter binding behavior for an
ApiController to use the WebAPI rules.
'simple types' default to use route data or query string
'complex types' default to use the body (formatters)
Adds ModelBindingAttribute to enabled model binding
- #704 part 2 of 2
- change `@Html.Id()` to sanitize return value; was identical to `@Html.Name()`
Copied `TagBuilder.CreateSanitizedId()` and `TagBuilder.Html401IdUtil` from MVC 5.2
- except this `CreateSanitizedId()` returns a valid identifier if first `char` is not a letter
- e.g. "[0].Name"
nits:
- expand variable names, use lots of `var`, put `public` members first
- add doc comments for `CreateSanitizedId()`
Note users will be able to apply different sanitization once we fix#1188.
- also make `TagHelperOutputExtensions.MergeAttributes()` case-insensitive
nits:
- deliniate attribute names in all resource strings
- update validation messages in TagHelperSample.Web
- Changed TagHelper property accessors from private to protected internal.
- Changed throw tests to be shorter.
- Changed reflection setting to now use the internal accessibility of the TagHelpers
- Removed activator to just use internal accessibility of TagHelpers.
- Changed new StringWriter() instances where we didn't need the StringWriter to be TextWriter.Null
- Updated project.json to have a valid webroot. Webroot isn't pointing to the specific folder because the TagHelperSample has no valid content for the webroot yet.
- build break due to invalid XML comment in `TagHelperOutputExtensions`
- nit: correct "overridden" spelling in same comment
- use `TagHelperOutputExtensions` in `TextAreaTagHelper`
- Added a TagHelper that targets the <a> tag and allows users to do the equivalent of Html.ActionLink or Html.RouteLink.
- Added tests to validate AnchorTagHelper functionality.
#1247
- Added the FormTagHelper.
- Utilized the IHtmlGenerator to share base functionality with the HTMLHelper counterparts.
- Added tests to validate FormTagHelper functionality.
#1246
- make a few more methods available as `internal static` in `DefaultHtmlGenerator`
- remove `IHtmlGenerator.GenerateOption()`; now `internal static`
nits:
- add `IHtmlGenerator.IdAttributeDotReplacement`
- move `DefaultHtmlGenerator.IdAttributeDotReplacement` after constructor
- move `HtmlHelper.ActionLink()` below static methods
- move newly-`internal` methods together in `DefaultHtmlGenerator`
- correct placement of `DefaultHtmlGenerator.GetValidationAttributes()` comment
- new Microsoft.AspNet.Mvc.TagHelpers.Test project
- bit of test infrastructure -- `TestableHtmlGenerator`
- short-curcuits validation attribute and AntiForgery additions
- should help when testing all MVC tag helpers
- part of #1243 (kind-of)
- mostly copied from `HtmlHelper` but refactored to
- consistently take a `ViewContext` parameter and return a `TagBuilder`
- provide `GenerateActionLink()` and `GenerateRouteLink()`
- provide a separate `GenerateHiddenForCheckBox()`, allowing
`GenerateCheckBox()` to return a `TagBuilder`
- `GenerateForm()`'s `method` parameter is a `string`, not `FormMethod`
nits: format document, consistent line wrapping, variable name changes, ...
Fix: The MvcOptions takes in a list of ExcludeFromValidationDelegate (Func<Type,bool>). This func verifies if the type is excluded in validation or not.
- #965
- test call-throughs from `Html.Editor[For]()` to inner `IHtmlHelper`
- add another parameter to `DefaultTemplatesUtilities.GetHtmlHelper()`
nit: reorder dictionaries at the top of `TemplateRenderer` slightly