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

Bound attribute keys don't maintain HTML provided case in TagHelperContext.AllAttributes #266

Closed
NTaylorMullen opened this issue Dec 29, 2014 · 0 comments
Assignees
Milestone

Comments

@NTaylorMullen
Copy link
Member

When generating code for TagHelpers, bound attributes are added to the TagHelperContext.AllAttributes collection with their TagHelperDescriptor name.

Example:

<foo bAr="123" />
public class FooTagHelper : TagHelper
{
    public int Bar { get; set; }

    public override void Process(TagHelperContext context, TagHelperOutput output)
    {
        // Outputs "bar", expected output is "bAr"
        Console.WriteLine(context.AllAttributes.First(kvp => kvp.Key.Equals("BAR", System.StringComparison.OrdinalIgnoreCase)).Key);
    }
}
@danroth27 danroth27 added this to the 4.0.0-rc1 milestone Jan 9, 2015
@NTaylorMullen NTaylorMullen changed the title Tag Helpers: Bound attribute keys don't maintain HTML provided case in TagHelperContext.AllAttributes Bound attribute keys don't maintain HTML provided case in TagHelperContext.AllAttributes Jan 23, 2015
@danroth27 danroth27 modified the milestones: 4.0.0-rc1, 4.0.0 Mar 16, 2015
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

3 participants