5

I'm intending to extend the Display DataAnnotation attribute to hold a value for the AccessKey for an input field so I can use it in my own LabelFor<> and TextBoxFor<> HtmlHelper extensions, something like this:

[Display(Name = "User name", AccessKey = "U")]

Before I do, can anyone tell me if there is an existing mechanism to achieve declarative access key functionality?

If there isn't, can someone tell me how to extend the Display DataAnnotation attribute. :-)

Oundless
  • 5,425
  • 4
  • 31
  • 33

1 Answers1

1

Maybe this approach will help you: asp.net MVC extending DataAnnotions

Community
  • 1
  • 1
brafales
  • 570
  • 3
  • 6
  • 22