ASP.NET Default Buttons This non-visual control…

less than 1 minute read

ASP.NET Default Buttons

This non-visual control allows you to assign a button to the "enter-pressed" clientside event of input controls. This makes it so that when the user presses Enter while in a textbox, the form will postback, and the serverside click event of your button is fired. The is done on a per-input-control basis. In a visual designer like Visual Studio or Web Matrix, this control will add a "DefaultButton" property to the properties window of the other input controls on the form. There are sample files showing how to set it up with a text editor. > >

Particularly useful within user controls where you may end up with multiple user controls per page, each preferring a different default action.

Updated: