Community blog feed
Enter button and several inputs
- Blog
- ASP.NET Cafe
- Posted
- 03 Jul 2009 at 05:43
Summary
In ASP.NET you have sometimes a problem. When you have several inputs (textboxes) and several buttons. You want user to submit it by hitting enter. For example one login box, one search box. You want to submit login box when user hits enter in password field, and search button when user hits enter in search field. The solution is easy! Just put controls inside the asp:panel with attribute DefaultButton="ButtonFind" ( where ButtonFind is ID of desired default button ). That's all!
Post extract
In ASP.NET you have sometimes a problem. When you have several inputs (textboxes) and several buttons. You want user to submit it by hitting enter. For example one login box, one search box. You want to submit login box when user hits enter in password field, and search button when user hits enter in search field. The solution is easy! Just put controls inside the asp:panel with attribute DefaultButton="ButtonFind" ( where ButtonFind is ID of desired default button ). That's all! It works!
Related blog entries
-
Metadata Classes – A Force for Good or Evil? :-)
by mtaulty
-
MIX09 Day 1 Keynote Pt 2: Scott Guthrie on Advancing User Experiences
by tims
-
ASP.NET, Windows Forms and JavaScript Exception and Error Handling - Exceptioneer
by Plip
-
Ok, time to get serious...
by Scott Galloway
-
Premature optimization and user perception...my pet project and CSS Sprites
by Scott Galloway