Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

enter key and multiple submit buttons in .net

if i have multiple submit buttons and the user enters some text in a textbox and presses enter. How can i specify which button event i want to fire?

like image 403
phil crowe Avatar asked Dec 21 '10 14:12

phil crowe


1 Answers

You can specify for an asp.net Panel the id of button in the property DefaultButton. So, you need to group the controls into panels and then you can specify the default button for any of them. Also, you can specify a default button for the whole page - in the form tag.

like image 183
Thea Avatar answered Nov 14 '22 10:11

Thea