Tuesday, November 13, 2007

Default button on ASP.NET form

I was using special JavaScript for specifying default button in ASP.NET forms.


I've just found perfect solution: Imagine you created form in asp.net like



and you need to perform LoginButton click when user presses enter in Password field. Best solution: wrap your form in Panel control and specify DefaultButton property.



LoginButton will act like default button.


Thanks, Gnilly

No comments: