Home  |  Contact us    
Setting default button on Web Form


How to set default button on a Web Form?

Setting a default button on a Web Form in ASP.NET 2.0
In ASP.NET 2.0, you can now set a default button on a page so that when the user presses the Enter key the button is automatically invoked.

For example, you have a page with two TextBox controls and two Button controls. You can configure the Submit button to be the default button so it is automatically clicked when a user presses the Enter key. To set the default button of form use
< form id="form1" runat="server"
defaultbutton="btnSubmit">



Category: ASP.NET 2.0 Faqs, Interview Questions & Answers



Ask New Questions
Microsoft.Net Framework
.Net 2.0 Namespaces
.Net Assemblies
OOPS Faqs in C#
ASP.Net Faqs
ASP.Net 2.0 Faqs
Web Services Faqs
ADO.Net Faqs
Database Faqs
OOPS Faqs
IT Project Management