?
Solved

ASP.NET - UpdatePanel around button and button is still causing a postback

Posted on 2008-10-01
3
Medium Priority
?
614 Views
Last Modified: 2013-11-08
I've got a page
http://josephdavis-portfolio.no-ip.org/budget/DataEntry.aspx
where everything is run by ajax through UpdatePanels.  Everything works very well including the button.  If you fill out the fields in the form and click on the 'Process' button, the page uses ajax to process the event.  However, when you use tab to flow through the fields and tab to the process button so that it has the focus and then you hit 'enter' it causes a postback.  Normally I wouldn't consider this to be to big of a problem, but the person that will primarily be using the application uses the tab key a lot to navigate forms and will encounter this bug often.  Is there any way to fix it?
0
Comment
Question by:josephdaviskcrm
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 15

Accepted Solution

by:
Solar_Flare earned 1000 total points
ID: 22618373
I am wondering if hitting the enter key isn't doing the button's postback and instead just submitting the form with a full postback - does the button click handler fire correctly when hitting the enter key?


does it help if you put a Panel inside your update panel and set it's defaultbutton property to your buttons name?
0
 
LVL 83

Assisted Solution

by:CodeCruiser
CodeCruiser earned 1000 total points
ID: 22624085
You could set this button to be the default button so that pressing Enter key activates this button. One work around is to use the Space key to press the button instead of the Enter.
0
 

Author Comment

by:josephdaviskcrm
ID: 22673222
Sorry to leave you guys hanging on this one.  Some stuff came up and this project ended up being abandoned.  So I will just divide the points between you and call it a day.  Thanks for your help.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

OverviewThis article demonstrates a simple search form using AJAX. The purpose of the article is to demonstrate how to use the same code to render a page and javascript (JQuery) and AJAX to make subsequent calls to refine the results. The princip…
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question