Click here to Skip to main content
12,348,802 members (29,038 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

Stats

10.2K views
5 bookmarked
Posted

How to make a button the default button on enter on an ASP.NET form

, 22 Jul 2011 CPOL
Rate this:
Please Sign up or sign in to vote.
You can set the default button on your form tag as below code.ORyou can set the default button on a panel as below.And you can place your...
You can set the default button on your form tag as below code.
<form id="form1"  runat="server" defaultbutton="Button1">

OR

you can set the default button on a panel as below.

<asp:Panel ID="panel1" runat="server" DefaultButton="Button1"></asp:Panel>


And you can place your controls on either form or on the panel.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Muthu Nadar
Team Leader
India India
No Biography provided

You may also be interested in...

Comments and Discussions

 
GeneralReason for my vote of 5 Native solutions are always better t... Pin
Lisetsky Val25-Jul-11 19:11
memberLisetsky Val25-Jul-11 19:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160621.1 | Last Updated 22 Jul 2011
Article Copyright 2011 by Muthu Nadar
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid