Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access keys in ASP.NET MVC

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. :-)

like image 219
Oundless Avatar asked Nov 15 '22 05:11

Oundless


1 Answers

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

like image 152
brafales Avatar answered Dec 17 '22 16:12

brafales