• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 641
  • Last Modified:

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

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
josephdaviskcrm
Asked:
josephdaviskcrm
2 Solutions
 
Solar_FlareCommented:
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
 
CodeCruiserCommented:
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
 
josephdaviskcrmAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now