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.
Remember Me
a@href@title, b, blockquote@cite, i, strong, u
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.
E-mail