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
-
Lowercase ASP.NET Route URLs
by Stu
-
jQuery and Microsoft
by ScottGu
-
Microsoft will support JQuery in the future!!!
by Thushan Fernando
-
ASP.NET AJAX Control Toolkit
by Benyamin Shoham
-
Using JSON to connect Flash with Asp.Net
by Benyamin Shoham