Call a specific button onClick event when the enter key is pressed C#

Static Tony picture Static Tony · Nov 6, 2008 · Viewed 16k times · Source

I'm trying to get a specific asp:button onclick event to fire when I press the enter key in a specific asp:textbox control.

The other factor to be taken into account is that the button is within a asp:Login control template.

I've no idea how to do this, suggestions on a postcard please.

Answer

kͩeͣmͮpͥ ͩ picture kͩeͣmͮpͥ ͩ · Nov 6, 2008

You could look at the DefaultButton property of the panel control.