Suppose there are two buttons named button1 & button2.I wnat that when the user presses enter key,button2 click event will fire? How to do dat,Can somebody tell me?

It can be done by setting default button property at page level.

The defaultbutton property can be specified at the Form level in the form tag

<form id="form1" runat="server" defaultbutton="button2 ">

set UseSubmitBehaviour =true for button2 and false for button1

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.