Multiple Forms and the Enter Button in ASP.NET 2.0#

If you are using ASP.NET 2.0 and have multiple forms or submit buttons, you may have found out that you can only have one form tag in the master page and are not allowed to have another form tag in the page. 

If you want to have the user press the enter button on the keyboard to cause any of your multiple submit buttons to submit, you have to use the <asp:Panel control and set the DefaultButton property equal to the button id that is in that panel. 

For example, I had an asp:Login control in a master page and also a search form.  When the user wanted to search and hit the enter key, it would try to login.  You could set the DefaultButton property in the master form element, but that is also dangerous if you have other forms throughout your site.  Also if you want to have it work depending on where the user has focus, then you have to use the panel control.

Tuesday, November 07, 2006 8:48:58 AM UTC #    Comments [11]  |  Trackback

 

Saturday, November 15, 2008 4:40:52 PM UTC
suchitra
Saturday, March 28, 2009 12:01:28 AM UTC
Hello everyone. Before we set our hearts too much upon anything, let us examine how happy those are who already possess it.
I am from Libya and also now teach English, give please true I wrote the following sentence: "Find cheap flights and discount airline tickets."

Thanks for the help :o, Rasia.
Thursday, May 07, 2009 8:22:08 PM UTC
Hello everyone. Before we set our hearts too much upon anything, let us examine how happy those are who already possess it.
I am from Libya and also now teach English, give please true I wrote the following sentence: "Find cheap flights and discount airline tickets."

Thanks for the help :o, Rasia.
Sunday, June 21, 2009 7:46:13 PM UTC
Good morning. Good design, who make it? Help me! Please help find sites for: Lamisil website. I found only this - better than lamisil. Fungal tablets, diflucan generic, sporanox, nizoral, lamisil, etc. Terbinafine hcl topical terbinafine hcl topical. Thanks :o. Alan from Ecuador.
Thursday, June 25, 2009 6:52:00 AM UTC
Good Day. I have a theory that the truth is never told during the nine-to-five hours. Help me! I can not find sites on the: Cialis attorney columbus. I found only this - find fast delivery Cialis. Now the business and work tension seems the culprit. Cyclic guanosine monophosphate cgmp leads to, your search for tadalafil mg. Thank :eek: Karif from Croatia.
Saturday, June 27, 2009 4:59:33 PM UTC
Excuse me. You must not lose faith in humanity. Humanity is an ocean; if a few drops of the ocean are dirty, the ocean does not become dirty. Help me! Can not find sites on the: Allopecia dosage related to prograf. I found only this - while on Prograf. This is a place where anyone prograf ipf buproprion sr mg. Immunosuppressive drug, any of a variety of substances used to tacrolimus trade name prograf is a product of the fungus streptomyces tsukubaensis. Best regards :-(, Dwight from Brazil.
Saturday, November 21, 2009 4:53:48 AM UTC
Could you help me. While we have the gift of life, it seems to me that only tragedy is to allow part of us to die - whether it is our spirit, our creativity, or our glorious uniqueness. Help me! I can not find sites on the: Who should not take caduet. I found only this - caduet side effects horrible. Yeni risk cholesterol present department, caduet. Caduet, before you provide the civil time determine the depending city guys. THX :-(, Macallister from Turkmenistan.
Tuesday, May 18, 2010 7:53:02 AM UTC
I recently came across your blog and have been reading along. I thought I would leave my first comment.
Thursday, May 20, 2010 8:27:07 PM UTC
asking for forgiveness after cheating. Identify specifically what you are up against and you will feel more confident.
Friday, July 09, 2010 2:04:38 PM UTC
This is really good information.
Friday, July 16, 2010 1:23:40 PM UTC
I recently came across your blog and have been reading along. I thought I would leave my first comment.
Name
E-mail
(will show your gravatar icon)
Home page

Comment (Some html is allowed: a@href@title, b, blockquote@cite, i, strong, u)  

Enter the code shown (prevents robots):

 

All content © 2010, Jim Zimmerman
Book
New Book
Links to me
On this page
Sponsors
Calendar
<November 2006>
SunMonTueWedThuFriSat
2930311234
567891011
12131415161718
19202122232425
262728293012
3456789
Archives
Tags
Blogroll OPML
Technorati
Favorite Links
Disclaimer

Powered by: newtelligence dasBlog 1.9.6264.0

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

Send mail to the author(s) E-mail