Latest web development tutorials

ASP.NET AccessKey property

Web Control Standard Properties Reference Web Control Standard Properties Reference

Definition and Usage

AccessKey property sets or returns the keyboard key to access a control.

Shortcut keys allow users to use the keyboard to switch the focus of input elements.

In most browsers, is accessed by pressing the Alt (on a PC) or Ctrl (on the Mac), while pressing the accesskey character on the keyboard to call.

grammar

<asp:webcontrolid="id" AccessKey="accessKey"runat="server" />
属性 描述
AccessKey 用于访问控件的字符。


Examples

The following examples are box set shortcut keys:

<form runat="server">
<asp:CheckBox id="check1" AccessKey="y" runat="server" />
</form>

The demonstration >>

Web Control Standard Properties Reference Web Control Standard Properties Reference